Do not reuse existing installation of .NET CLI in SB prep script #17892
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.
The license scanning pipeline started failing a few days after the .NET 8 release in the
release/8.0.1xxbranch with the following error when attempting to run the tests:The step which installs the .NET CLI was essentially a no-op, not installing it at all. This behavior began as a result of the agent version being updated to include .NET 8 preinstalled. The behavior of the eng/common/tools.sh script that is used to install the .NET CLI was detecting this already installed version because it matched the version specified in global.json. Because this installation was skipped, nothing existed at the expected installation location where the test execution was targeting.
The solution to this is to set a flag which causes the installation to skip the check for a matching installation.