How can I create different DLLs in one project?
Posted
by jaloplo
on Stack Overflow
See other posts from Stack Overflow
or by jaloplo
Published on 2009-03-03T14:45:41Z
Indexed on
2010/05/28
22:02 UTC
Read the original article
Hit count: 272
I have a question I don't know if it can be solved. I have one C# project on Visual Studio 2005 and I want to create different DLL names depending on a preprocessor constant. What I have in this moment is the preprocessor constant, two snk files and two assembly's guid. I also create two configurations (Debug and Debug Preprocessor) and they compile perfectly using the snk and guid appropiate.
#if PREPROCESSOR_CONSTANT
[assembly: AssemblyTitle("MyLibraryConstant")]
[assembly: AssemblyProduct("MyLibraryConstant")]
#else
[assembly: AssemblyTitle("MyLibrary")]
[assembly: AssemblyProduct("MyLibrary")]
#endif
Now, I have to put the two assemblies into the GAC. The first assembly is added without problems but the second isn't.
What can I do to create two or more different assemblies from one Visual Studio project?
It's possible that I forgot to include a new line on "AssemblyInfo.cs" to change the DLL name depending on the preprocessor constant?
© Stack Overflow or respective owner