从VS2015发布后,DNX Web命令抛出“无法解析项目"错误 [英] DNX Web command throwing 'unable to resolve project' error after publishing from VS2015

查看:83
本文介绍了从VS2015发布后,DNX Web命令抛出“无法解析项目"错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是有关.net核心的过时预发行版.

我已使用Visual Studio 2015的beta/预览版在预发行版ASP.Net 5中创建了一个基本项目(后来更名为asp.net核心),我已将该项目发布到文件系统中,并且正在尝试使用命令从那里运行它

I have created a basic project in pre-release ASP.Net 5 (later on was renamed to asp.net core) using a beta/preview of visual studio 2015, I have published the project to a file system and am trying to run it from there using the command

    dnx . web

导致的错误是无法解决项目".我检查了dnvm是否使用默认框架.我发布的目录包含web,web.cmd,wwwroot和approot文件夹.我还有什么要检查的吗?

the error that results is 'unable to resolve project'. I have checked that dnvm is using the default framework. My published directory has web, web.cmd, wwwroot, and approot folders. Is there anything else I should be checking?

我正在使用:asp.net core 1.0.0-beta4 clr

I am using: asp.net core 1.0.0-beta4 clr

推荐答案

对于ASP.NET Core项目,而不是从解决方案目录中运行,您应该进一步放下几个文件夹.

For ASP.NET Core projects, instead of running from the solution directory, you should go down a few folders further.

例如,对我来说,如果我在解决方案目录中,则会遇到与您相同的错误.

So for me, for example, I find that if I am at the solution directory I get the same error as you.

/home/myname/AspNetWebApplication <-- solution root folder

/home/myname/AspNetWebApplication/src/AspNetWebApplication <-- project root folder

但是对我来说,设置上还有更多错误,因为出现无法加载应用程序或执行命令时出错".

For me however there are still more things wrong on my setup, as I get "Error unable to load application or execute command".

在早期的beta和RC1中,dnx webdnx kestrel是要运行的命令,在我的情况下,不需要在两者之间键入的点.在1.0 rtm中,在项目源目录中运行dotnet run,在二进制文件中运行dotnet <yourassemblynamehere>.dll,请替换为您的主要二进制程序集的名称.

In early betas and RC1, dnx web or dnx kestrel is the command to run, and that the dot you're typing in between is not needed in my case. In 1.0 rtm it's dotnet run to run from the project source directory and dotnet <yourassemblynamehere>.dll to run your binary, replace with the name of YOUR main binary assembly.

最好检查该工具(dnx或dotnet)是否在路径中,以及是否按照ASP.NET Core安装说明安装了我的环境.

It is good to check that the tool (dnx or dotnet) is in the path, and that my environment is installed as per the ASP.NET Core installation instructions.

这篇关于从VS2015发布后,DNX Web命令抛出“无法解析项目"错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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