Contents
- 1 How to compile multiple DLLs in one project?
- 2 What happens if you have two versions of the same DLL?
- 3 What to do with multiple EXE files in one project?
- 4 What are the disadvantages of separate projects / DLLs?
- 5 Can a single DLL contain multiple assemblies in.net?
- 6 Is it possible to have more than one project in Visual Studio?
How to compile multiple DLLs in one project?
You can have like 5 Class Library projects and compile them, generating 5 DLLs. To expand upon Julien Hoarau’s answer above, here is a solution that allows you to compile multiple DLL files from within a single project, and have those DLL files be compiled from multiple CS files. Just open your csproj file and add this before the tag:
What happens if you have two versions of the same DLL?
The referenced DLLs are copied to the output dir, but because they have the same name, they will override each other, and will cause the runtime loading of the assembly to have a version mismatch. Welcome to DLL hell. Let’s take my client’s project as a practical example.
How to compile multiple DLL files in csproj?
To expand upon Julien Hoarau’s answer above, here is a solution that allows you to compile multiple DLL files from within a single project, and have those DLL files be compiled from multiple CS files. Just open your csproj file and add this before the tag:
What to do with multiple EXE files in one project?
Class2 = class2.exe – Check all records in the database to see if they would match any saved queries. Class3 = class3.exe – Purge old records from the database. Not sure why you would want to do that with the example you have given. Do these classes have a protocol with each other?
What are the disadvantages of separate projects / DLLs?
The major disadvantages, as others said before me, are, first of all complexity (management, maintenance), then performance (but this is another discussion, it’s not easy as saying that) 3. If I create a new solution/DLL for every shareable resource isn’t going to be lots of solutions?
Do you use DLLs to separate your application?
Lots of DLLs to deploy. In general I suggest using at least one DLL (to separate your business logic from your UI), and more if you’ll have different versions of your application that might not need all of that code. *We often make ourselves believe we’ll reuse that wonderful Order class.
Can a single DLL contain multiple assemblies in.net?
And finally, one rarely used feature in .NET is that a single .DLL can contain multiple Modules (effectively it’s several assemblies sharing a single set of metadata). I wouldn’t suggest using this, but it’s interesting to know it’s how things work: http://www.codeproject.com/Articles/9364/Merging-NET-assemblies-using-ILMerge
Is it possible to have more than one project in Visual Studio?
Since many of the plugins are relatively small (only one source-file/class) I would like to have them all in one project in visual studio, but to successfully do this I would need each source-file/class to be compiled into its own dll file, is this possible using visual studio?