0

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

3 Answers3

2

Just make additional projects within your solution to get different assemblies (dlls).

Brian Rasmussen
  • 114,645
  • 34
  • 221
  • 317
  • I think it's very compicate solution when I have 100 or more projects in 1 solution. Moreover, It need very big space for keep same share dll. –  Apr 27 '09 at 03:44
  • If you don't need to edit all 100+ assemblies at the same time, you can just reference some of the assemblies instead of including them as projects. – Brian Rasmussen Apr 27 '09 at 03:46
  • I don't get your problem, do you have multiple projects or not? If you do, you should be getting multiple DLL's already. – Blindy Jun 02 '09 at 18:42
1

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?

Naren
  • 704
  • 1
  • 7
  • 15
  • Because I need to load a small dll(< 100 KB per child page). Or you have idea to create small dll from big dll? Please help me. Thanks. –  Apr 27 '09 at 05:46
  • The only thing I can think of doing is using something like 'mygeneration' or 'codesmith' which generates a new project for every file in your project - each containing just the one file/class. For doing a release build, you would need a separate solution file which includes all the tiny projects whereas for dev purposes, you can use a solution with the single project. Having said this, There really should not be a problem with loading just one big dll. If its loaded only once per app domain, the overhead will be minimal. – Naren Apr 27 '09 at 23:48
0

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.

Kamil
  • 13,363
  • 24
  • 88
  • 183