1 year ago

#118551

test-img

Lori

Some assembly binding redirects are not generated automatically even if AutoGenerateBindingRedirects is set to true

I have a simple net48 project with some nuget package references. However, some assembly binding redirects are not generated, even if AutoGenerateBindingRedirects and GenerateBindingRedirectsOutputType is set to true!

<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <TargetFramework>net48</TargetFramework>
    <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
    <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
    <GenerateBindingRedirectsOutputType>true</GenerateBindingRedirectsOutputType>
  </PropertyGroup>
  ...
  <ItemGroup>
    <PackageReference Include="Microsoft.WindowsAPICodePack.Core" Version="1.1.0" />
    <PackageReference Include="Microsoft.WindowsAPICodePack.Shell" Version="1.1.0" />
    <PackageReference Include="ZetaLongPaths" Version="1.0.10.41" />
    <PackageReference Include="OxyPlot.Core" Version="2.0.0" />
    <PackageReference Include="OxyPlot.WindowsForms" Version="2.0.0" />
    ...
  </ItemGroup>
</Project>

For some of our package references the bindings are generated automatically, however for the 5 I have mentioned above no redirect is added! Since we are using renovate-bot to update our nuget packages, this will break the automation since we need to add these 5 bindings manually which requires adaption once the version has been changed!

Does anybody know how to get those bindings generated automatically?

nuget

assembly-binding-redirect

0 Answers

Your Answer

Accepted video resources