Karl Brown
Karl Brown

Reputation: 57

Buggy Visual Studio and DNX Issues: The Dnx Runtime package needs to be installed

I am having slew of DNX-related issues in my Visual Studio and dvnm setup related to detecting the version of DNX I have installed and properly referencing my dnx runtime path.

To start, I am trying to perform a Publish from my project and only DNX version 1.0.0-rc1-update1 is available in the 'Target DNX Version' dropdown. I attempt to proceed and the error that is being thrown is

The Dnx Runtime package needs to be installed. See output window for more details

In my global.json file,

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

the version of my DNX is indicated as 1.0.0-rc1-update2.

Furthermore, running

dnvm list

on the command prompt indicates that 1.0.0-rc1-update2 clr and coreclr are installed!

To make matters more complicated, when I first open up the project I receive the following alert:

DNX SDK version 'dnx-clr-win-x86.1.0.0-rc1-update2' is required by your solution but is not 
installed on this machine. Do you want to install it now? If you select No,
'dnx-clr-win-x86.1.0.0-rc1-update1' will be used as the solution DNX SDK for this session.

Indicating that it is unlikely Visual Studio detects my install of update2, AND when I attempt to "install it now" I get the following result:

DNX SDK version 'dnx-clr-win-x86.1.0.0-rc1-update2' failed to install. The solution will 
use DNX SDK version 'dnx-clr-win-x86.1.0.0-rc1-update1' for this session

To make matters even more complicated, when one looks in C:\Users\CENSORED.dnx\runtimes, every runtime is update1, despite dnvm list displaying all update2.

When I surrender to Visual Studio and ignore dnvm and change my version to update1 in my global.json file,

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

I get 4 errors after attempting to publish

C:/Users/CENSORED/.dnx/runtimes/dnx-clr-win-x64.1.0.0-rc1-update1\runtimes\dnx-clr-win-x86.1.0.0-rc1-update1
dnx-clr-win-x86.1.0.0-rc1-update1   
Locations probed:
Unable to locate runtime 'dnx-clr-win-x86.1.0.0-rc1-update1'

indicating (from my understanding) that Visual Studio is looking at a malformed path which is preventing it from running properly.

So in summary, there are two errors, one with my inability to properly recognize or install update2 and another with the malformed path references.

Does anyone have any idea what to do?

Upvotes: 1

Views: 432

Answers (1)

Karl Brown
Karl Brown

Reputation: 57

Turned out I needed to reset the DNX home directory using the following command

set DNX_HOME=

Upvotes: 0

Related Questions