DNX(RC1)Web命令不起作用 [英] DNX (rc1) web command does not working

查看:50
本文介绍了DNX(RC1)Web命令不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在运行MVC6应用程序时遇到麻烦. 项目构建良好,没有错误,程序包已正确加载(由于恢复没有错误)

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

这是我的global.json代码.如您所见,应用程序和计算机上的dnx版本都相同

好的,我正在将VS2015与WebTools-beta8和DotNetVersionManager-beta8一起使用.

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

这是我的project.json的一部分:

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" ]
}

当我单击"Web"命令时,将生成项目,但是cmd窗口会向我显示下一条消息:('无法加载文件或程序集Microsoft.Extensions.PlatformAbstract')

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')

并且输出/调试"窗口以 程序"[14200] dnx.exe"已退出,代码为1(0x1)."

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

我已经更新了dnvm和webTools,但是问题没有解决.顺便说一句,在另一台PC上,项目运行良好,所以问题可能出在我的dnx.

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.

推荐答案

您是否尝试过从命令提示符恢复依赖项?

Have you tried restoring your dependencies from a command prompt?

要执行此操作,只需在命令提示符下运行"dnu restore".确保命令提示符下的工作目录位于您的MVC项目中.

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

这篇关于DNX(RC1)Web命令不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆