shared classes/package in C#

R

Ryan Liu

Hi,

I have common classes/packages to share by different sets of projects. Some
share by project A and B, some by project A and C.

What is the best practice to handle shared classes? Should I take each set
of common classes out and compile them to individual dlls, e.g. ab.dll.
ac.dll, together with A.exe, B.exe, C.exe?

That way I ends up lots of dlls(projects) and kind of annoying.

In Java, I just put them in a single source tree, compile them all together
and when I deploy, I can use script to pull out right *.class.

But in CSharp, it is compiled to one dll, not one to one class files.
 
K

Klaus H. Probst

The rough equivalent of .class files in .NET are "netmodules". Look them up
in MSDN if you want to go there.

Personally I don't see why lots of little DLLs are a problem. You don't even
have to load them into a VS.NET solution if they're fairly static and you
can use nANT or MSBuild to compile them instead.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top