I have many different c# projects in a solution where one assembly is dependent on others. I have them all building in the correct order. I also have CopyLocal set to false for all references. However, when the builds of assemblies are done further down the stack, some of the assemblies are getting copied to the bin\debug folder. Why is this happening? How can I stop this since it is taking up disk space for no reason. The only project being built that needs all the assemblies is the last one built which is the .exe assembly. I have a separate script that copies all the assemblies to this bin\debug folder as I need after the build process completes.
+2
A:
Setting copy local to false only works if assemblies are in the Global Assembly Cache. Any assembly which isn't GACed will be copied into a project in which it is referenced.
You could add a custom MSBuild task to your project which deletes them afterwards from all other projects aside from your main one.
blowdart
2009-08-25 05:05:24