How does Copy-local work? log4net.dll is not being copied to MyProject output directory

Unfortunately it appears that according to the following statement taken from the MSDN documentation the CopyLocal functionality does not work as expected for assemblies already in the GAC.

If you deploy an application that contains a reference to a custom component that is registered in the GAC, the component will not be deployed with the application, regardless of the CopyLocal setting. In previous versions of Visual Studio, you could set the CopyLocal property on a reference to ensure that the assembly was deployed. Now, you must manually add the assembly to the \Bin folder. This puts all custom code under scrutiny, reducing the risk of publishing custom code with which you are not familiar.

More information can be found at the following page which explains details about how project references work.

MSDN: Project References

Leave a Comment