-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Add global.json to pick correct SDK version #5118
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
Add global.json to pick correct SDK version #5118
Conversation
global.json
Outdated
| "sdk": { | ||
| "version": "2.0.0" | ||
| } | ||
| } No newline at end of file |
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.
Please add a newline at the end of the file.
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.
Done. BTW the original file was simply the output of running:
dotnet new global.json --sdk-version 2.0.0
|
@daxian-dbw Could you please review this bit change? It looks very good. |
|
Any update on this? I'm constantly having to create this file on every new branch I create. Otherwise, I can't build. Plus this allows the PowerShell team to specify which version of the SDK is requires. This will reduce contributor issues when their build fails with the message above. And when the team is ready to move to a later version of the SKD like 2.0.2, the global.json can be updated to reflect that change. |
|
@rkeithhill Thanks for this PR! Sorry that we had it slipped off our radar. |
Fix #5015
This sets the version of the dotnet SDK that should be used to compile the project. I happen to have newer version of the SDK (2.0.2) on my machine and without this file, the build attempts to use the newer version of the SDK which doesn't work.
BTW if you have 2.0.2 installed, without this file when you run
Start-PSBuildyou get this warning and the build stops - even if you have 2.0.0 installed: