0

I created an empty project AspNet MVC 6, and chose .Net 4.6

My project.json file:

{
  "webroot": "wwwroot",
  "version": "1.0.0-*",

  "dependencies": {
    "Microsoft.AspNet.Server.IIS": "1.0.0-beta5",
    "Microsoft.AspNet.Server.WebListener": "1.0.0-beta5"
  },

  "commands": {
    "web": "Microsoft.AspNet.Hosting --config hosting.ini"
  },

  "frameworks": {
    "dnx451": { },
    "dnxcore50": { }
  },

  "publishExclude": [
    "node_modules",
    "bower_components",
    "**.xproj",
    "**.user",
    "**.vspscc"
  ],
  "exclude": [
    "wwwroot",
    "node_modules",
    "bower_components"
  ]
}

dnvm list:

Active Version     Runtime Architecture OperatingSystem Alias
------ -------     ------- ------------ --------------- -----
       1.0.0-beta4 clr     x64          win
       1.0.0-beta4 clr     x86          win
       1.0.0-beta4 coreclr x64          win
       1.0.0-beta4 coreclr x86          win
       1.0.0-beta5 clr     x64          win
       1.0.0-beta5 clr     x86          win
       1.0.0-beta5 coreclr x64          win
       1.0.0-beta5 coreclr x86          win
       1.0.0-beta6 clr     x86          win             default

When I run the project I get the following error:

The current runtime target framework is not compatible with 'WebApplication20'.

Current runtime Target Framework: 'DNX,Version=v4.5 (dnx45)' Type: CLR Architecture: x86 Version: 1.0.0-beta6-12256

Please make sure the runtime matches a framework specified in project.json

Where is my mistake?

1 Answers1

0

You cannot have multiple versions installed, you need to only have one version of the runtime installed.

after dnvm uninstall deleted all files in %USERPROFILE%.dnx\packages (only do this after uninstalling from programs and features)

dnvm list

dnvm upgrade or upgrade-self

Community
  • 1
  • 1
Transformer
  • 6,963
  • 2
  • 26
  • 52