Click here to Skip to main content
15,886,873 members
Home / Discussions / C#
   

C#

 
AnswerRe: Simple and reusable system for user registration and tracking and auto-updates Pin
OriginalGriff12-Sep-15 1:43
mveOriginalGriff12-Sep-15 1:43 
GeneralRe: Simple and reusable system for user registration and tracking and auto-updates Pin
Bartosz Jarmuż12-Sep-15 4:19
Bartosz Jarmuż12-Sep-15 4:19 
AnswerRe: Simple and reusable system for user registration and tracking and auto-updates Pin
Dave Kreskowiak12-Sep-15 3:25
mveDave Kreskowiak12-Sep-15 3:25 
GeneralRe: Simple and reusable system for user registration and tracking and auto-updates Pin
Bartosz Jarmuż12-Sep-15 4:22
Bartosz Jarmuż12-Sep-15 4:22 
QuestionC# RUN zero-based index of the longest run in a string Pin
Erics Johnson11-Sep-15 4:40
Erics Johnson11-Sep-15 4:40 
AnswerRe: C# RUN zero-based index of the longest run in a string Pin
Richard Andrew x6411-Sep-15 5:09
professionalRichard Andrew x6411-Sep-15 5:09 
GeneralRe: C# RUN zero-based index of the longest run in a string Pin
Erics Johnson12-Sep-15 10:56
Erics Johnson12-Sep-15 10:56 
QuestionAdvantages of using .dll files over linking .cs files to projects (for my own generic helper classes / extension methods) Pin
Bartosz Jarmuż11-Sep-15 0:52
Bartosz Jarmuż11-Sep-15 0:52 
Hello,
I have a question - I have a helper project which I use in all the applications that I create. It contains some extension methods and a bunch of generic helper classes, controls etc. I update /extend the helper project from time to time.

I tried two approaches for using it
1) add .cs files directly (Add as link) to each project where I use them
2) compile it as .dll and add it as reference

I see some benefits and drawbacks of these approaches.
The first one:
+ is simpler, because the helper classes get compiled into the exe file, therefore I can often very easily provide just a single .exe file that will work just fine. Because I add as link, I can be pretty sure that whenever I build any project that uses the helper, the helper files will be the latest version.
+ is even simpler, because I can separate the files, so that my extension methods that run fine on .NET 4.0 can be referenced separately from the ones that require .NET 4.5, which means that the app as a whole can run on .NET 4.0
- doesnt seem to be 'best practice'

The second one:
+ appears to be the right approach, but:
- requires me to deliver a separate .dll file, which for some reason is much more difficult for users (they tend to share my programs without the .dll, which then crashes on startup)
- as it gets compiled into a single .dll, it will require the highest version of .NET - many of my users don't have .NET 4.5 and only some elements of my helper class require this, which means I can be forcing some people to update their systems for no reason
- I also need to make sure that whenever I update any of my programs, I also deliver the .dll file - even though I don't know if it has been changed since the last version, or not (it could have been, but it could as well be the same version). I cannot see a simple way to determine that, without keeping track of assembly version, which is additional work. For now, when I update my programs, I only deliver updated exe, and I like to keep it small and low profile.

So, what is the actual benefit for using the .dll file here? Please note, that I am the only person editing code of all the applications and the helper files.
Thanks in advance for your opinions!
AnswerRe: Advantages of using .dll files over linking .cs files to projects (for my own generic helper classes / extension methods) Pin
OriginalGriff11-Sep-15 1:16
mveOriginalGriff11-Sep-15 1:16 
GeneralRe: Advantages of using .dll files over linking .cs files to projects (for my own generic helper classes / extension methods) Pin
Bartosz Jarmuż11-Sep-15 1:39
Bartosz Jarmuż11-Sep-15 1:39 
GeneralRe: Advantages of using .dll files over linking .cs files to projects (for my own generic helper classes / extension methods) Pin
OriginalGriff11-Sep-15 2:02
mveOriginalGriff11-Sep-15 2:02 
GeneralRe: Advantages of using .dll files over linking .cs files to projects (for my own generic helper classes / extension methods) Pin
Bartosz Jarmuż11-Sep-15 2:24
Bartosz Jarmuż11-Sep-15 2:24 
GeneralRe: Advantages of using .dll files over linking .cs files to projects (for my own generic helper classes / extension methods) Pin
OriginalGriff11-Sep-15 2:33
mveOriginalGriff11-Sep-15 2:33 
AnswerRe: Advantages of using .dll files over linking .cs files to projects (for my own generic helper classes / extension methods) Pin
F-ES Sitecore11-Sep-15 3:58
professionalF-ES Sitecore11-Sep-15 3:58 
GeneralRe: Advantages of using .dll files over linking .cs files to projects (for my own generic helper classes / extension methods) Pin
Bartosz Jarmuż11-Sep-15 4:40
Bartosz Jarmuż11-Sep-15 4:40 
GeneralRe: Advantages of using .dll files over linking .cs files to projects (for my own generic helper classes / extension methods) Pin
Bartosz Jarmuż11-Sep-15 7:15
Bartosz Jarmuż11-Sep-15 7:15 
GeneralRe: Advantages of using .dll files over linking .cs files to projects (for my own generic helper classes / extension methods) Pin
F-ES Sitecore12-Sep-15 2:19
professionalF-ES Sitecore12-Sep-15 2:19 
GeneralRe: Advantages of using .dll files over linking .cs files to projects (for my own generic helper classes / extension methods) Pin
David A. Gray11-Sep-15 11:14
David A. Gray11-Sep-15 11:14 
GeneralRe: Advantages of using .dll files over linking .cs files to projects (for my own generic helper classes / extension methods) Pin
jschell11-Sep-15 11:58
jschell11-Sep-15 11:58 
GeneralRe: Advantages of using .dll files over linking .cs files to projects (for my own generic helper classes / extension methods) Pin
F-ES Sitecore12-Sep-15 2:17
professionalF-ES Sitecore12-Sep-15 2:17 
GeneralRe: Advantages of using .dll files over linking .cs files to projects (for my own generic helper classes / extension methods) Pin
David A. Gray12-Sep-15 20:12
David A. Gray12-Sep-15 20:12 
GeneralRe: Advantages of using .dll files over linking .cs files to projects (for my own generic helper classes / extension methods) Pin
F-ES Sitecore13-Sep-15 3:03
professionalF-ES Sitecore13-Sep-15 3:03 
GeneralRe: Advantages of using .dll files over linking .cs files to projects (for my own generic helper classes / extension methods) Pin
David A. Gray13-Sep-15 7:03
David A. Gray13-Sep-15 7:03 
GeneralRe: Advantages of using .dll files over linking .cs files to projects (for my own generic helper classes / extension methods) Pin
jschell13-Sep-15 12:07
jschell13-Sep-15 12:07 
GeneralRe: Advantages of using .dll files over linking .cs files to projects (for my own generic helper classes / extension methods) Pin
jschell13-Sep-15 12:04
jschell13-Sep-15 12:04 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.