Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/monodevelop.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMikayla Hutchinson <m.j.hutchinson@gmail.com>2019-01-16 08:55:04 +0300
committerMikayla Hutchinson <m.j.hutchinson@gmail.com>2019-01-16 08:55:04 +0300
commitf1c5eae4a706fa2827ceb3fcd7310a76f277daaa (patch)
treefa05d15b239e2b5aa7ec125b4d787dcf5b21bbb0 /main/msbuild
parent4caf609519950ed6941edc0f938e21a114113bb0 (diff)
Use app.config for conflict resolution in all projects
Diffstat (limited to 'main/msbuild')
-rw-r--r--main/msbuild/MonoDevelop.BeforeCommon.targets33
1 files changed, 33 insertions, 0 deletions
diff --git a/main/msbuild/MonoDevelop.BeforeCommon.targets b/main/msbuild/MonoDevelop.BeforeCommon.targets
index 7bcb851328..e3dde42018 100644
--- a/main/msbuild/MonoDevelop.BeforeCommon.targets
+++ b/main/msbuild/MonoDevelop.BeforeCommon.targets
@@ -83,4 +83,37 @@
-->
<PackageReference Include="RoslynCodeTaskFactory" Version="2.0.7" />
</ItemGroup>
+
+ <!--
+ HACK: For libraries, disable AutoUnifyAssemblyReferences, and instead use
+ the ResolveAssemblyReference.AppConfigFile for conflict resolution.
+
+ This works around the issue where the bad SharpZipLib 4.x.x.x in Mono's GAC
+ wins out over actual newer versions from NuGet.
+
+ As a bonus, this also means we get warnings from extensions when they
+ require binding redirects in the main app.config.
+ -->
+ <Target Name="_InjectAppConfigForResolveReferences"
+ BeforeTargets="ResolveAssemblyReferences"
+ Condition="'$(GenerateBindingRedirectsOutputType)' != 'true' And '@(AppConfigWithTargetPath)'==''">
+ <PropertyGroup>
+ <_InjectedAppConfigForResolveReferences>true</_InjectedAppConfigForResolveReferences>
+ <AutoUnifyAssemblyReferences>false</AutoUnifyAssemblyReferences>
+ </PropertyGroup>
+ <ItemGroup>
+ <AppConfigWithTargetPath Include="$(MSBuildThisFileDirectory)..\src\core\MonoDevelop.Startup\app.config" />
+ </ItemGroup>
+ </Target>
+
+ <!--
+ if we injected the app.config for conflict resolution, remove it so it doesn't get local copied
+ -->
+ <Target Name="_RemoveInjectedAppConfig"
+ AfterTargets="ResolveAssemblyReferences"
+ Condition="'$(_InjectedAppConfigForResolveReferences)'=='true'">
+ <ItemGroup>
+ <AppConfigWithTargetPath Remove="@(AppConfigWithTargetPath)" />
+ </ItemGroup>
+ </Target>
</Project>