Nitram
Nitram

Reputation: 6716

Recursive Copy-Local

Yet another question regarding copy-local in msbuild.

The problem I got is that too many assemblies are copied.

I have the following structure:

Now the two third party libraries are referenced by B.dll with local copy set to false. They will be present in the target environment, no matter what. B.dll is a dependency of A.dll with local copy set to true. I need B.dll where ever I deploy A.dll.

Now the problem is the two third party assemblies are copied as well. I don't want that and I do not understand why this is happening.

One thing that may be important: The projects generating A and B are in different solutions.

Anyone having a idea what is happening and a hint how to solve it?

Upvotes: 3

Views: 876

Answers (1)

Carnifex
Carnifex

Reputation: 531

Try set

<PropertyGroup> 
  <UseCommonOutputDirectory>true</UseCommonOutputDirectory>
</PropertyGroup>

In the B project. This shold prevent MsBulid from coping the references to the OutputPath.

Upvotes: 3

Related Questions