Select to view content in your preferred language

Critical dependency issue - Unexpected ESRI DLL files copied next to a target dll

3246
14
Jump to solution
10-28-2018 08:45 PM
MarkMindlin
Frequent Contributor

Hi,

 

We have a DLLs library that references ESRI DLLs and we upgrade it from version to version constantly (10.0 -> 10.X.X -> 10.6.1). This time we have a strange behaviour: at Rebuild it copies unexpected ESRI DLL files next to a target dll.

We assume that a setting “Copy Local” in Properties of a referenced DLL is a key to understand the issue.

 

Why are these additional ESRI DLLs included as a reference?

What is important: We have two our dlls (solutions): first and second.

 The first  has only ESRI references.

The second has a reference to the first and ESRI references.

 The issue does not appear in the first. It appears in the second.

Any help will be greatly appreciated.

Tags (2)
0 Kudos
14 Replies
MarkMindlin
Frequent Contributor

We think the key is a GAC,

and Visual Studio 2017 does not see the ESRI DLLs in the GAC when builds.

0 Kudos
MarkMindlin
Frequent Contributor
0 Kudos
MarkMindlin
Frequent Contributor

How could we set "CopyLocalDependenciesWhenParentReferenceInGac" to false?

0 Kudos
by Anonymous User
Not applicable

You can set it in the project (.csproj)

  <PropertyGroup>
    <!-- Fix the default copy local behaviour changed in VS 2015 -->
    <DoNotCopyLocalIfInGac>true</DoNotCopyLocalIfInGac>
  </PropertyGroup>

See also: Behavior change for RAR Copy Local behavior when in the GAC · Issue #24 · Microsoft/msbuild · GitHub 

MarkMindlin
Frequent Contributor

Many thanks Sean. It really helped!!

0 Kudos