Add reminder to check /.dotnet
dir when tests fail to find SDK
#18271
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.
Description
This augments [test infrastructure] fix for "The type initializer for '<StartupCode$FSharp-Test-Utilities>.$Utilities' threw an exception." #16324 with a reminder to compare the output of
dotnet --list-sdks
and/or the contents of the temporary/.dotnet
directory againstglobal.json
.The exception from [test infrastructure] fix for "The type initializer for '<StartupCode$FSharp-Test-Utilities>.$Utilities' threw an exception." #16324 can be thrown when you have a stale local version of the SDK in the local
/.dotnet
directory, but you do have a version of the SDK installed globally that matchesglobal.json
. Doing a restore doesn't help, because it won't replace the contents of/.dotnet
, because you already have the version requested inglobal.json
installed globally. This can be super confusing, and it happens seldom enough that I never remember that all I need to do is delete the stale/.dotnet
directory. I know some people just reflexively dogit clean -xdf
all the time, but not everyone always has the patience and a fast enough computer and/or network connection to do a clean build every time :)Checklist
No release notes necessary.