Note that there are some explanatory texts on larger screens.

plurals
  1. POAdditional global include directory in Visual Studio for C#
    text
    copied!<p>There are a lot of little things I find myself re-writing here and there because they might be too large/complex to represent as a snippet, but realistically it doesn't make sense to make a stand-alone DLL out of it because we might only be talking a few dozen or a few hundred lines of code.</p> <p>For example a little form which contains only a text box where the user enters a password and closes on {Enter}.</p> <p>Or an extension method which can serialise/deserialise any object to/from a GZipped file assuming the object is marked as <code>Serializable</code>.</p> <p>The list goes on. I have accumulated lots of little bits and pieces over the years and it's not organised in any neat way.</p> <p>In C++ projects, I can write a lib file containing these bits of code which I can add to my compiler settings in such a way that any future C++ project I create has this lib included. I have done this with ATL and Boost.</p> <p>I don't know of a way to do this for C# projects. Is it possible?</p> <p><strong>Edit:</strong></p> <p>If I make an assembly, I have to compile it to a DLL and distribute the DLL alongside my main executable. The DLL may be small or it may be quite large, I don't know. But I may only need to use a few tiny functions in that DLL for my project. In C++, only the functions I use are statically linked when I use the library, however if I distribute my software with a DLL then I have to distribute everything.</p> <p>I know it is possible to merge the DLL with the main executable so that the user isn't aware that there is a separate library, however the whole DLL is still being packaged along with the executable.</p> <p>Imagine I write a DLL with lots of my own maths, stats, file IO, image manipulation, serialisation, user IO, etc included. Nothing fancy, just some common things I find myself doing quite frequently. The DLL might be, say, 4MB.</p> <p>Now I want to write a program which uses a tiny part of the DLL, and if I were to simply copy/paste the necessary code then my EXE would end up being, say, 700kB.</p> <p>Are you saying that I either copy/paste the code I need, or I have to distribute a 4MB DLL along with my 700kB EXE?</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload