Use global.json to pin .Net Core SDK version and update it from 2.1.402 to 2.1.602 #909
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
For a reproducible build it is very important to pin the version of the SDK to be used using global.json, see docs here. Locally I cannot build PSES if I have the .Net Core 3 previews or even just 2.2 RTM installed because by default dotnet uses the latest available version.
The existing check for
dotnet --version
would not work in the build any more because newer versions of dotnet write tostderr
when dotnet is invoked with a mismatch to the version in global.json, we use this only to find out whether we need to bootstrap the required version of .Net or not, hence the change to use the--list-sdks
paramterAlso remove redundant
script:NetCoreTestingFrameworkVersion
variable.