I'm setting the AutoGenerateBindingRedirects and GenerateBindingRedirectsOutputType properties to true in a .NET Framework class library .csproj file. However, whereas the generated .dll.config file includes redirects for a bunch of system assemblies, there are none generated for any of the NuGet package references.
Here is a snippet of my .csproj:
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net471</TargetFramework>
<AssemblyName>MyLibrary</AssemblyName>
<RootNamespace>MyLibrary</RootNamespace>
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>key.snk</AssemblyOriginatorKeyFile>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<GenerateBindingRedirectsOutputType>true</GenerateBindingRedirectsOutputType>
<Version>6.5.0.0</Version>
</PropertyGroup>
...
<ItemGroup>
<PackageReference Include="Microsoft.SqlServer.SqlManagementObjects" Version="161.46437.65" />
<PackageReference Include="Microsoft.SqlServer.Types" Version="14.0.1016.290" />
<PackageReference Include="Oracle.ManagedDataAccess" Version="21.3.0" />
</ItemGroup>
</Project>
The generated .dll.config file includes redirects for Microsoft.Bcl.AsyncInterfaces, Newtonsoft.Json, System.Memory, etc., but none for any of the packages above. I need it to include a redirect for Microsoft.SqlServer.Types specifically.