Closed carlossanlop closed 1 month ago
When consuming this nuget package in a console app, then printing typeof( Microsoft.IO.Directory).Assembly.CodeBase I confirmed that: ... When targeting .NET 6.0, this assembly is used: bin/Debug/net6.0/Microsoft.IO.Redist.dll ... However, the csproj in the release/6.0 branch only targets net472, and also the nuget package only contains a net472/ folder
Correct, you'll likely notice a warning in that net6.0
project like:
warning NU1701: Package 'Microsoft.IO.Redist 6.0.1' was restored using '.NETFramework,Version=v4.6.1, .NETFramework,Version=v4.6.2, .NETFramework,Version=v4.7, .NETFramework,Version=v4.7.1, .NETFramework,Version=v4.7.2, .NETFramework,Version=v4.8, .NETFramework,Version=v4.8.1' instead of the project target framework 'net6.0'. This package may not be fully compatible with your project.
Are these differences in the ILSpy information expected?:
It looks to me like some common attribute settings might be missing from maintenance-packages. The ones here that look worth following up on are AssemblyDefaultAlias
, AssemblyMetadata
, and DefaultDllImportSearchPathsAttribute
. Looks like a lot of those come from https://github.com/dotnet/runtime/blob/release/8.0/eng/versioning.targets. You might want to handle that as a separate PR.
It looks to me like some common attribute settings might be missing from maintenance-packages. The ones here that look worth following up on are
AssemblyDefaultAlias
,AssemblyMetadata
, andDefaultDllImportSearchPathsAttribute
. Looks like a lot of those come from https://github.com/dotnet/runtime/blob/release/8.0/eng/versioning.targets. You might want to handle that as a separate PR.
Got it! Will take care of that separately. Thanks.
Need to fix the following api compat error now:
C:\.tools\.nuget\packages\microsoft.dotnet.apicompat.task\9.0.100-preview.2.24102.10\build\Microsoft.NET.ApiCompat.ValidatePackage.targets(39,5):
error : API compatibility errors between 'lib/net472/Microsoft.IO.Redist.dll' (C:\.tools\.nuget\packages\microsoft.io.redist\6.0.1\microsoft.io.redist.6.0.1.nupkg) and 'lib/net472/Microsoft.IO.Redist.dll'
error CP0003: [Baseline] lib/net472/Microsoft.IO.Redist.dll assembly public key token 'cc7b13ffcd2ddd51' does not match with lib/net472/Microsoft.IO.Redist.dll '31bf3856ad364e35'.
error : API breaking changes found. If those are intentional, the APICompat suppression file can be updated by rebuilding with '/p:ApiCompatGenerateSuppressionFile=true'
We fixed this in Microsoft.Bcl.HashCode by adding <StrongNameKeyId>Open</StrongNameKeyId>
.
Migrated from 6.0.
The Microsoft.IO.Redist nuget package has the following information:
When consuming this nuget package in a console app, then printing
typeof( Microsoft.IO.Directory).Assembly.CodeBase
I confirmed that:bin/Debug/net472/Microsoft.IO.Redist.DLL
bin/Debug/net6.0/Microsoft.IO.Redist.dll
However, the csproj in the release/6.0 branch only targets net472, and also the nuget package only contains a
net472/
folder: https://github.com/dotnet/runtime/blob/6bc4d4a68b944fa6643203efb5a6c5e8eccc8522/src/libraries/Microsoft.IO.Redist/src/Microsoft.IO.Redist.csproj#L12Question: Are these differences in the ILSpy information expected?: