Skip to content

Binding redirects are not generated automatically even with AutoGenerateBindingRedirects #1351

Open
@JoseFMP

Description

@JoseFMP

There are two issues here:

  • First the <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects> is not recognized. The warning message is wrong:
`<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <OutputType>WinExe</OutputType>
    <TargetFramework>net462</TargetFramework>
    <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
  </PropertyGroup>
  <ItemGroup>
    <PackageReference Include="Newtonsoft.Json" Version="9.0.1" />
    <PackageReference Include="WindowsAzure.Storage" Version="7.2.1" />
  </ItemGroup>
</Project>`
Produces a warning message saying: 

 `1>Consider app.config remapping of assembly "Newtonsoft.Json, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed" from Version "6.0.0.0" [] to Version "9.0.0.0" [C:\Users\me\.nuget\packages\newtonsoft.json\9.0.1\lib\net45\Newtonsoft.Json.dll] to solve conflict and get rid of warning.

1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets(1964,5): warning MSB3276: Found conflicts between different versions of the same dependent assembly. Please set the "AutoGenerateBindingRedirects" property to true in the project file. For more information, see http://go.microsoft.com/fwlink/?LinkId=294190.`

The information in the link says I should enable `AutoGenerateBindingRedirects`, but indeed `<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>`  is activated.
  • Second: No redirects are created. The assemblies try to access the same wrong version described in the error message.

It looks like the <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects> is somehow overlooked.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions