Why so many copies of .NET DLL?

S

Siegfried Heintze

Why does .NET make so many copies of my DLLs? I inherited a large project
and there are two pervasive DLLs that get used everywhere: PlcmObject.dll
and PlcmUtil.dll

Why our build procedure copies them all over our build directory is a
mystery to me. I did a dir /s c:\ and found 170 copies (I assume that is 85
copies each) of these two DLLs. Can anyone guess why our build procedure
would make so many copies? I thought the whole point of using a DLL instead
of an OLB (can you create OLBs for .NET project?) or including the source
code again was to save disk space.

Now I assume our build procedure would not make copies of these DLLs in the
two Microsoft directories below. Why does Microsoft (Visual Studio perhaps?)
make so many copies? I guess NUnit is making copies too.

6 copies in the Application Data directory, for example:
c:/Documents and Settings/sheintze/Local Settings/Application
Data/assembly/dl2/GGH8B4CG.6O1/3C1CCLC7.KVR/d27da362/4238e818_09dac701/PlcmUtility.dll

9 copies in the nunit directory, for example:
c:/Documents and Settings/sheintze/Local
Settings/Temp/nunit20/ShadowCopyCache/633227782609218750/Tests/assembly/dl2/9f92218c/207c98d8_53dfc701/PlcmUtility.DLL

This is making life hell because periodically we have to find and delete
these 170 copies to make the build work!
Thanks,
siegfried
 
M

Mattias Sjögren

Why does .NET make so many copies of my DLLs? I inherited a large project
and there are two pervasive DLLs that get used everywhere: PlcmObject.dll
and PlcmUtil.dll

If you have a reference to one of those assemblies with the CopyLocal
property set to true, it will be copied to the output directory when
you build. The obvious way to prevent that is to set CopyLocal to
false.


Mattias
 

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