Quantcast
Channel: WE MOVED to github.com/nuget. This site is not monitored!
Viewing all articles
Browse latest Browse all 7612

Closed Issue: NuGet should not generate binding redirects for binaries that are in the current framework [3072]

$
0
0
We're hitting an issue with Microsoft.Bcl package where NuGet is adding a binding redirect for a binary that is considered part of the framework, this causes the application to crash because the binding redirect refers to assembly version that is not available at runtime.

@Repro:

1. Create a new Console Application targeting 4.5
2. Create a new Portable Library targeting .NET Framework 4.5, Silverlight 4, Windows Phone 7.5 and .NET for Windows Store apps
3. Add a reference to the portable library from the Console Application
4. Install the Microsoft.Bcl package (1.0.16-rc) to both projects

@Expected: No binding redirect for System.Runtime in the .NET Framework 4.5 project because a ___later version___ is part of the target framework (see C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\RedistList\FrameworkList.xml)
@Actual: Binding redirect

<dependentAssembly>
<assemblyIdentity name="System.Runtime" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-1.5.11.0" newVersion="1.5.11.0" />
</dependentAssembly>


You can use the IVsFrameworkMultiTargeting to determine if a given assembly version is available as part of a given target framework.
Comments: verified it's fixed for this case in 2.7

Viewing all articles
Browse latest Browse all 7612

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>