-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Closed
Milestone
Description
I've been using dotnet --version
for some time in build environments to determine whether or not the version of the .NET Core SDK I need for my build is already installed. If not, I download it and install it locally.
With .NET Core SDK 2.1.200
and later, the behaviour has changed so that if global.json
in the current directory specifies a newer version that the version of dotnet
that is invoked, rather than just returning its own version, it now errors with the following message:
A compatible SDK version for global.json version: [{version in global.json}] from [{working directory}\global.json] was not found
Did you mean to run dotnet SDK commands? Please install dotnet SDK from:
http://go.microsoft.com/fwlink/?LinkID=798306&clcid=0x409
Given that dotnet --version
is such a simple command, it should not matter what is in global.json
, particularly for scenarios such as this where it is likely that a newer version is wanted and the command is just being used for version detection.
reduckted and averichev
Metadata
Metadata
Assignees
Labels
No labels