Bug 59304 - Mono's copy of SharpZipLib causes build conflicts
Summary: Mono's copy of SharpZipLib causes build conflicts
Alias: None
Product: Class Libraries
Classification: Mono
Component: General ()
Version: unspecified
Hardware: PC Windows
: --- normal
Target Milestone: Untriaged
Assignee: Alexander Köplinger [MSFT]
Depends on:
Reported: 2017-09-07 18:12 UTC by Mikayla Hutchinson [MSFT]
Modified: 2018-02-11 16:30 UTC (History)
4 users (show)

Tags: bugpool-archive
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on GitHub or Developer Community with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description Mikayla Hutchinson [MSFT] 2017-09-07 18:12:47 UTC
Mono's (outdated and misversioned) copy of SharpZipLib causes build conflicts.

Can we remove it from the reference assembly profiles?

/Library/Frameworks/Mono.framework/Versions/5.0.1/lib/mono/msbuild/15.0/bin/Microsoft.Common.CurrentVersion.targets(5,5): Warning MSB3277: Found conflicts between different versions of the same dependent assembly that could not be resolved. These reference conflicts are listed in the build log when log verbosity is set to detailed. (MSB3277) (Foo)
When I build with verbosity set to details:
There was a conflict between "ICSharpCode.SharpZipLib, Version=, Culture=neutral, PublicKeyToken=1b03e6acf1164f73" and "ICSharpCode.SharpZipLib, Version=, Culture=neutral, PublicKeyToken=1b03e6acf1164f73". "ICSharpCode.SharpZipLib, Version=, Culture=neutral, PublicKeyToken=1b03e6acf1164f73" was chosen because it was primary and "ICSharpCode.SharpZipLib, Version=, Culture=neutral, PublicKeyToken=1b03e6acf1164f73" was not. References which depend on "ICSharpCode.SharpZipLib, Version=, Culture=neutral, PublicKeyToken=1b03e6acf1164f73" [/Applications/Visual Studio.app/Contents/Resources/lib/monodevelop/bin/ICSharpCode.SharpZipLib.dll]. /Applications/Visual Studio.app/Contents/Resources/lib/monodevelop/bin/ICSharpCode.SharpZipLib.dll Project file item includes which caused reference "/Applications/Visual Studio.app/Contents/Resources/lib/monodevelop/bin/ICSharpCode.SharpZipLib.dll". ICSharpCode.SharpZipLib References which depend on "ICSharpCode.SharpZipLib, Version=, Culture=neutral, PublicKeyToken=1b03e6acf1164f73" [/Library/Frameworks/Mono.framework/Versions/5.0.1/lib/mono/4.6.1-api/ICSharpCode.SharpZipLib.dll]. /Applications/Visual Studio.app/Contents/Resources/lib/monodevelop/bin/Mono.Addins.Setup.dll Project file item includes which caused reference "/Applications/Visual Studio.app/Contents/Resources/lib/monodevelop/bin/Mono.Addins.Setup.dll". Mono.Addins.Setup MonoDevelop.Ide MonoDevelop.Core Mono.Addins.Gui /Library/Frameworks/Mono.framework/Versions/5.0.1/lib/mono/gac/monodoc/ Project file item includes which caused reference "/Library/Frameworks/Mono.framework/Versions/5.0.1/lib/mono/gac/monodoc/". MonoDevelop.Ide MonoDevelop.Core /Applications/Visual Studio.app/Contents/Resources/lib/monodevelop/bin/MonoDevelop.Ide.dll Project file item includes which caused reference "/Applications/Visual
Comment 1 Marek Safar 2017-09-11 12:32:32 UTC
I agree but as that's a breaking change it's going to take some time.

I propose following steps

1. Mark all entry types as Obsolete in ICSharpCode.SharpZipLib with the message like "This assembly has been deprecated. Please use https://www.nuget.org/packages/SharpZipLib/ instead" or something like that
2. Remove the assembly from -api folders which is a breaking change and we need to introduce .NET Mono -api folder before we do that so we have a workaround

About the misversioned complain, that's again legacy reason when we supported both .net versions 2 and 4 and to distinguish between them (e.g. for GAC) we bumped the version.
Comment 2 Nate Cook 2017-11-02 17:32:08 UTC
Has your suggested deprecation taken place Marek? Would like to see the associated warning go away eventually.
Comment 3 Marek Safar 2018-01-10 11:41:10 UTC
We should also not install it in newly introduced reference assemblies folders (4.7.1 at this point)
Comment 4 Alexander Köplinger [MSFT] 2018-01-15 20:19:02 UTC
ICSharpCode.SharpZipLib.dll is now marked as obsolete and doesn't exist in the 4.7.1-api reference assemblies anymore in master/2017-12/2017-10 branches.

We can fully remove it for all .NET profiles once we can do a breaking change (Mono 6.0).