Unable to start process dotnet.exe

2019-01-18 07:56发布

I am attempting to setup a new work space and transfer all of my projects from my old computer to the new one. However, I am getting this error when I try to run IIS Express:

Unable to start process C:\Program Files\dotnet\dotnet.exe. The web server request failed with status code 500.

I am working in Visual Studio 2015, update 3 and I am using .NET Core RC2. Does anyone have any idea how to fix this and get my old projects running on this new machine?

22条回答
劳资没心,怎么记你
2楼-- · 2019-01-18 08:50

Just close VS delete the project.lock.json file, open VS the file will be restored and you shouldn't have problems anymore.

查看更多
相关推荐>>
3楼-- · 2019-01-18 08:51

I found the solution by reinstalling .NET CORE SDK

查看更多
劳资没心,怎么记你
4楼-- · 2019-01-18 08:51

It is caused by a wrong Path in applicationhost.config file, this file you can find inside your project folder. Go to your project folder. There you will find a .vs named folder, if you can not find it then in folder open You have to Uncheck Hidden folder. Once you have found it navigate to config folder there you find applicationhost.config. Open this file in notepad and provide your project location like that:-

<virtualDirectory path="/" physicalPath="c:\users\*****\documents\visual studio 2015\Projects\<ProjectFolderName>\<Projectname>" />

Hope this will help you.

查看更多
霸刀☆藐视天下
5楼-- · 2019-01-18 08:54

I was able to fix the error by removing $(solutionDir).vs\config\applicationhost.config. After restart VS 2017 recreated the file.
The file became invalid after I moved the solution from one location to another.

Thanks to https://elanderson.net/2016/09/unable-to-start-process-dotnet-exe/ for the idea.

查看更多
趁早两清
6楼-- · 2019-01-18 08:56

In my case I have a few projects in one solution and none of them has been set up as startup project.

So, just right-click on project (not solution!) as choose Set as StartUp Project.

查看更多
Melony?
7楼-- · 2019-01-18 08:56

I had this and it turns out I was in Release build. Changed to Debug build and it worked.

查看更多
登录 后发表回答