views:

28

answers:

3

I have a VS 2008 web application project that is getting large. My structure looks like:

- WebRoot
  - Common/
  - Foo/
  - Bar/
  - Baz/

so I end up with a single Webroot.dll that contains the code for common, foo, bar, and baz. Is it possible to set it so that I end up with common/ in webroot.dll, and code in foo ends up in foo.dll, bar in bar.dll, etc?

Update:

A couple of suggestions to move some stuff into class libraries. We already have a dozen or so separate class library projects as part of the solution; Foo, Bar and Baz contain nothing but web forms and the associated code-behinds, so moving them into separate class library projects is not feasible.

+3  A: 

You could "move out" some code into class libraries. That will easily get you separate DLLs.

Technically there is a possibility to output "multifile assemblies", but I'm not sure if Visual Studio has any built-in options for doing that out-of-the-box. You could probably specify extra parameters for the csc.exe somewhere in the settings and see if it works for you.

Developer Art
A: 

You just need to separate your solution into multiple projects. Create a Common class library project, Foo, etc. and reference them from the web project.

Derek Greer
A: 

Yes, but you have to create multiple web application projects in Visual Studio. (That is, you can't configure a single Visual Studio project to emit multiple dlls.)

You can do it by breaking your application up and hosting the sub-applications within a single virtual directory.

Omar Khan has written a nice series of articles about this:

Jeff Sternal