问题
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