问题
Because I'm working on Creating RIA Framework with Silverlight & C#. So I need to use rich features of Silverlight such as dynamic loading. But I found that Visual Studio will merge all class library(same namespace or difference namespace) into one dll.
Do you have any idea to build 2 or more dlls from C# project? I just create 1 project for 1 child page. So If I have 100 child pages in my solution, I will create 100+ projects for this solution that doesn't make sense.
Thanks
回答1:
Just make additional projects within your solution to get different assemblies (dlls).
回答2:
You cannot produce more than one dll from a project. And its not practical to create hundreds of projects - one for each class.
So why not just create the one dll and dynamically load that?
回答3:
One VS project can compile one binary file. There is probably no way to workaround this.
What is your problem about having many projects in solution? This is not bad.
- you have less mess with versions
- you can work on one dll when somebody else is working on another
- you can deactivate projects you don't want to work with
- compilation is faster, because not modified projects dont need to compile again
I had one case like this in work (a lot of projects in solution). You will get used to it.
来源:https://stackoverflow.com/questions/792136/can-i-build-2-or-more-dlls-from-c-sharp-project-in-visual-studio-2008