Search code examples
asp.netasp.net-mvcvisual-studio-2015dnxdnvm

ASP.NET MVC 6 Project cannot find DNX Run time


When I try to build the project the error I get is as follows..

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

I have tried running both

dnvm upgrade
dnvm upgrade -r CoreClr

And when I run

dnvm list

I can see the run time installed which matches my project properties. I have also tried the solution outlined here;

http://www.sblackler.net/2015/05/02/Up-And-Running-With-DNX-DNVM-DNU/

Anyone have any ideas what else I can try? Is there a way to explicitly point my project to the run time in the .dnx folder of my

C:\Users\<Username>\.dnx 

folder?


Solution

  • This might be a bit late, but better late than never ;)

    clean up your dnx runtimes in C:\Users\USERNAME\.dnx and run dnvm upgrade. This should reinstall the latest runtimes. Or just use dnvm install <version> to install the ones you require.

    Next, make sure your project references the right dnx runtime package in global.json depending on your preferences.

    "sdk": {
      "version": "1.0.0-beta7",
      "runtime": "clr",
      "architecture": "x86"
    }
    

    Check project properties to point to the specific runtime of your choice.

    Project Properties

    Also try and keep your dependencies in the same beta version to avoid anomalies.