DNX (rc1) web command does not working

被刻印的时光 ゝ 提交于 2019-12-22 08:23:03

问题


I have troubles with running MVC6 application. Project builds well, no errors, packages are loaded correctly ( no errors due restoring)

Here is my global.json code. As you see, both dnx versions in app and on machine are the same

Sure, I am using VS2015 with WebTools-beta8 and DotNetVersionManager-beta8.

This is part of my project.json:

"commands": {
  "web": "Microsoft.AspNet.Server.Kestrel",
  "gen": "Microsoft.Extensions.CodeGeneration"
},

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

"exclude": [
    "wwwroot",
    "node_modules",
    "bower_components",
    "Content"
],
"publishExclude": [
    "Content",
    "node_modules",
    "bower_components",
    "**.xproj",
    "**.user",
    "**.vspscc"
],
"scripts": {
    "postrestore": [ "npm install", "bower install" ],
    "prepare": [ "gulp copy" ]
}

When i click on 'Web' command, project builds, but then cmd window show me next message:('Could not load file or assembly Microsoft.Extensions.PlatformAbstract')

And Output/Debug window ends with "The program '[14200] dnx.exe' has exited with code 1 (0x1)."

I have updated dnvm and webTools, but problem is not solved. By the way, on another PC, project runs well, so problem might be with my dnx.


回答1:


Have you tried restoring your dependencies from a command prompt?

To do so just run 'dnu restore' from a command prompt. Make sure the command prompts working directory is at your MVC project.



来源:https://stackoverflow.com/questions/33652357/dnx-rc1-web-command-does-not-working

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!