I have a solution with more than 100 c# projects. We always make CopyLocal option false for all assemblies to avoid some issues. Sometimes some developers chec-in project files with CopyLocal option True for assemblies. This creates issues while running the software later
Is it possible to make the the build activity fail, if CopyLocal option is True?
We are automating the build proess with MS Build and Cruise control net.
Short answer: Yes!
I’m no MSBuild expert but I know how to do this with NAnt. It’s pretty simple and there shouldn’t be much difference achieving the same result with MSBuild. This is the process:
True:For project references:
If the result is greater than 0 you have references with CopyLocal set to
Trueso fail the build. Pitfall: Be aware that CopyLocal is also consideredTrueif nodePrivateis missing.