DNX Web command throwing 'unable to resolve project' error after publishing from VS2015

十年热恋 提交于 2019-12-03 11:33:21

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

versus

/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".

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.

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.

various dnx commands appear to only operate in the "expected" folder within your application. For example with SQL scaffolding, it has to be directly in the models folder, otherwise there are issues.

enter image description here

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