-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix regression in selecting default RuntimeIdentifier #3543
Fix regression in selecting default RuntimeIdentifier #3543
Conversation
e29ed33
to
fac52f3
Compare
@@ -305,6 +308,7 @@ private void ReadItemGroups() | |||
FrameworkAssemblies = reader.ReadItemGroup(); | |||
FrameworkReferences = reader.ReadItemGroup(); | |||
NativeLibraries = reader.ReadItemGroup(); | |||
PackageDependencies = reader.ReadItemGroup(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bump format version
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nguerrera I've bumped it, can you re-approve?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cache format version needs to be bumped
460e0b1
to
3bef5b2
Compare
….1 (dotnet#3543) - Microsoft.DotNet.Cli.Runtime - 3.1.100-preview3.19562.1
Description
Fixed change in behavior (regression) that was introduced when we started including the RuntimeIdentifier graph in the SDK and passing it to NuGet.
Customer Impact
The change in behavior had to do with the automatic selection of the PlatformTarget. In specific cases, the PlatformTarget would be set to x86, where it would have previously been set to AnyCPU. This is because previously you had to have a (transitive) dependency on the Microsoft.NETCore.Platforms package to get the RuntimeIdentifier graph, and without it, you wouldn't get assets that didn't exactly match the default RuntimeIdentifier (win7-x86). Since no native assets were found, the PlatformTarget defaulted to AnyCPU, even though if the RuntimeGraph had been available there would have been native assets.
Roslyn ran into this, their apps switched to x86 unintentionally. We are not sure how many other customers would be impacted, as the combination of factors necessary to see the behavior change is somewhat of an edge case.
Regression?
Yes, regressed with #3406
Risk
Low
Fixes #3495
I thought of a "clever" way to fix this regression. We revert to the AnyCPU PlatformTarget if:
This should match the PlatformTarget which SDKs prior to the 3.0 SDK would have used.