Petr Ciml
Petr Ciml

Reputation: 41

Change .NET Development Utility (DNU) version in Visual Studio Code

how I could changing version of DNU utility used by Visual Studio Code?

I have switched CoreCLR version to 1.0.0-beta5 (using DNVM)

When I'm typed "dnu" in command line, there are used correct version (CoreCLR-x64-1.0.0-beta5-12103)

When I run "dnu restore" task from Visual Studio Code, are used different version - "Clr-x86-1.0.0-rc1-16231"

Version of VS Code - 0.10.5

Thanks, Petr

Upvotes: 1

Views: 263

Answers (2)

Banketeshvar Narayan
Banketeshvar Narayan

Reputation: 3899

I was also facing similar type of issues but it is resolved after changing the default dnx version.

I was not sure about command to change the defalt dnx so I re-installed x86 and I noticed that the dnx version which is installed at last become the default dnx version. To reinstall it use following command

dnvm install 1.0.0.-rc1-update1 -arch x86

Before installation of x86 enter image description here

after installing x86 enter image description here

if this is not you case or it does not resolve your issue. you can remove all your existing dnx version and reinstall the dnx for version "1.0.0.-rc1-update1" or latest available version.

Added

to change the DNX runtime Version use the following command

dnvm use <DNX Version> -r <Runtime> -arch <Architecture>

e.g. dnvm use 1.0.0-rc1-update1 -r coreclr -arch x64

and to see the current version use

dnx --version

enter image description here But this is not persistent it will apply to the current session only if you want to make your changes persistent then use the below command.

dnvm use 1.0.0-rc1-update1 -r coreclr -arch x64 -p

Upvotes: 1

tugberk
tugberk

Reputation: 58454

Put a gloabl.json file inside the root of your solution (or any sub directory relative to your project.json file) and define the runtime version you want to use like this.

{
    "sdk": {
        "version": "1.0.0-rc1-final"
    }
}

Upvotes: 1

Related Questions