Skip to content
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 retrieval of SDK version on .NET 6.0.0 #2624

Closed
wants to merge 1 commit into from

Conversation

Arshia001
Copy link

Fixes #2618. I'm not sure if a test can be implemented, since we can't enforce values for RuntimeInformation.FrameworkDescription.

@yazeedobaid
Copy link
Collaborator

Thanks for contributing!

Stripping the build information will lead to using 6.0.0 currently in the reported issues. For the next versions of DotNet, we cannot guarantee that stripping the build information is the correct way to resolve the runtime version matching the specified SDK.

Using RuntimeInformation.FrameworkDescription to determine the runtime version seems to be not guaranteed and how it determines the runtime version is not obvious. I tried it with the following installed SDKs and runtimes:

SDK version -> runtime version
6.0.100-preview.3.21202.5 -> 6.0.0-preview.3.21201.4
6.0.100 -> 6.0.0

Specifying the two SDKs in a global.json file, in both cases, it resolved to 6.0.0-preview.3.21201.4 runtime. Stripping the build information will lead to 6.0.0 which is the latest. But we cannot guarantee this for the next releases.

Currently, I'm working on a PR to use the DotNet releases package Baron has suggested which resolved the correct SDK version and we can predict what we will get instead of guessing using RuntimeInformation.FrameworkDescription.

@Arshia001
Copy link
Author

Yes, I just saw your changes. That's obviously the more stable way to resolve this issue. Keep up the good work!

@Arshia001 Arshia001 closed this Nov 15, 2021
@yazeedobaid
Copy link
Collaborator

@Arshia001 thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

SdkAssemblyResolver fails to pick up .NET 6.0
2 participants