How to check the version of . net core and uninstall and reinstall another

Asked

Viewed 2,887 times

1

I need to install the version of . net core 2.0. I need to know which version is installed and uninstall to install this one. How do I do this?

  • 1

    Use CLI. Run the command dotnet --version. No need to uninstall to update, just install the new one that the two live together in harmony.

1 answer

2

According to doc https://docs.microsoft.com/en-us/dotnet/core/tools/dotnet?tabs=netcore1x you can use via command line (CMD for example)

If it is version 1.x the supported arguments are:

dotnet [command] [arguments] [--additionalprobingpath] [-d|--diagnostics] [--fx-version]
    [-h|--help] [--info] [-v|--verbosity] [--version]

Version 2.x:

dotnet [command] [arguments] [--additional-deps] [--additionalprobingpath] [-d|--diagnostics]
    [--fx-version] [-h|--help] [--info] [--roll-forward-on-no-candidate-fx] [-v|--verbosity] [--version]

Then I believe that being version 1.x or 2.x you can use the command:

dotnet --version

Or:

dotnet --info

Command list of version 1.x

  • --additionalprobingpath <PATH>

    Path containing research policy and assemblies to be investigated.

  • -d or --diagnostics

    Enable the diagnostic output.

  • --fx-version <VERSION>

    The runtime version of . NET Core installed to be used to run the application.

  • -h or --help

    Print a brief help for the command. If you have dotnet, it will also print a list of available commands.

  • --info

    Print detailed information about the CLI tools and environment, such as the current operating system, SHA confirmation for the version and other information.

  • -v or --verbose

    Enable the detailed output.

  • --version

    Prints the SDK version of . NET Core in use.

Command list of version 2.x

  • --additional-deps <PATH>

    Path to the archive deps.json additional.

  • --additionalprobingpath <PATH>

    Path containing research policy and assemblies to be investigated.

  • -d or --diagnostics

    Enable the diagnostic output.

  • --fx-version <VERSION>

    The runtime version of . NET Core installed to be used to run the application.

  • -h or --help

    Print a brief help for the command. If you have dotnet, it will also print a list of available commands.

  • --info

    Print detailed information about the CLI tools and environment, such as the current operating system, SHA confirmation for the version and other information.

  • --roll-forward-on-no-candidate-fx

    Roll forward in no shared candidate structure.

  • -v or --verbose

    Enable the detailed output.

  • --version

    Prints the SDK version of . NET Core in use.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.