Description
Microsoft.IdentityModel.Tokens recently added a dependency on Microsoft.Bcl.TimeProvider 8.0.1 which uncovered a publishing error. The package contains Microsoft.Bcl.TimeProvider.dll for .NET 8 that contains an ILLink.Substitutions.xml resource with the following content:
<linker>
<assembly fullname="Microsoft.Bcl.TimeProvider" feature="System.Resources.UseSystemResourceKeys" featurevalue="true">
<!-- System.Resources.UseSystemResourceKeys removes resource strings and instead uses the resource key as the exception message -->
<resource name="FxResources.Microsoft.Bcl.TimeProvider.SR.resources" action="remove" />
<type fullname="System.SR">
<method signature="System.Boolean UsingResourceKeys()" body="stub" value="true" />
</type>
</assembly>
</linker>
There are, however, no other resources in the .dll and the script generates the following errors during publish:
resource ILLink.Substitutions.xml in Microsoft.Bcl.TimeProvider, Version=8.0.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51(5,6): error IL2008: Microsoft.Bcl.TimeProvider: Could not resolve type 'System.SR'. [/Users/teamcity/actions-runner/_work/emclient/emclient/MailClient/MailClient.csproj::TargetFramework=net8.0-macos]
resource ILLink.Substitutions.xml in Microsoft.Bcl.TimeProvider, Version=8.0.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51(4,6): error IL2040: Microsoft.Bcl.TimeProvider: Could not find embedded resource 'FxResources.Microsoft.Bcl.TimeProvider.SR.resources' to remove in assembly 'Microsoft.Bcl.TimeProvider'. [/Users/teamcity/actions-
This affects all the net8.0-macos
/ net8.0-ios
builds because they run ILLink as part of the build process.
It seems that the 9.0.0-rc.2.24473.5 version of the package doesn't suffer from this authoring issue. Is it safe to migrate to the new version? What's the guidance for bumping the NuGet version number in transitive references? Should I suggest the Azure AD team (https://github.com/AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet) to bump the dependency to the 9.0.0-rc2 version? /cc @FuPingFranco