'Unable to start process dotnet.exe
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?
Solution 1:[1]
I was having the same problem. I look for dotnet.exe in that directory and it exists but debugger cannot execute it, so i Restart Visual Studio 2015 as administrator and it works!
Solution 2:[2]
Just close VS delete the project.lock.json file, open VS the file will be restored and you shouldn't have problems anymore.
Solution 3:[3]
The issue in my case was
1- I upgrade (ported) my project (console/website) from .net 4.5 framework
to donetcoreapp 2.0
2- .NET Framework 4.5 project had Web.Config
3- dotnetcore 2.0 does not have concept of maintaining web.config.
4- So whenever I ran the project I got the same error
solution:
Just deleted 'Web.Config'
and it started working for me.
Solution 4:[4]
in my case. i choose "ProjectName" instead of "IIS Express" while running/debugging. and it works/open with a console output window and selected browser, keep console output window open while debugging. Hope this will work.
Solution 5:[5]
Visual Studio 2017 -> The fix for me was to choose the Project Name instead of IISExpress when debugging/running.
Solution 6:[6]
- Close VS 2015 (it seems that the issue is resolved in VS 2017).
- Remove all files in \bin and \obj. Remove project.lock.json.
- Run VS.
- Rebuild.
If the above solution doesnt work in VS2017 .Net Core, Run as VS2017 as ADMIN. If no ADMIN access to your machine, you can change the 'launchSettings.json' to work on port 8080 like below and after that follow above 4 steps.
"applicationUrl": "http://localhost:8080/",
Solution 7:[7]
This is what worked for me:
I've had the same issue, and it turned out that I simply didn't have the right version of the runtime (1.1.0); instead I was trying to use 1.1.0 assemblies with 1.0.1 runtime.
The resolution is simple - download and install SDK from here, but pick the right version! It turned out that if you want version 1.1.0 you should select "Current" option (button).
Basically the problem is caused by stupid interface at the referenced page - if you don't pay attention you'll download v1.0.1 since it is "LTS" version, and "LTS" option is default there. What to say... Yet another disappointment from .NET team in this crazy-versioning, crazy-moniker, crazy-platform times...
The quotes are from peske: https://github.com/aspnet/Home/issues/1719
Solution 8:[8]
this is an answer to an issue slightly different to what OP has posted. If the error message has just "dotnet.exe", not the full path of dotnet.exe("C:\ProgramFiles\DotNet\dotnet.exe"), then check if the dotnet.exe is in System.Environment path, if not add it and run VS as an admin
Solution 9:[9]
Solution 10:[10]
The solution in my case was deleted web.config from the root of the project. I was working on an ASPnetcore project and after a week the error started. I am unsure how that web.config file got added but once I delete that their error got resolved.
Solution 11:[11]
I have this issue right after updating Microsoft Visual Studio 2017 pro, so far I found 3 potential solutions :
Restart Visual Studio works, sometimes,
Delete %USERPROFILE%.nuget may solve the issue,
Uninstall, then reinstall dotnet SDK,
Solution 12:[12]
Solution for me was to close visual studio 2017, and reopen the solution. :)
Solution 13:[13]
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.
Solution 14:[14]
Solution for me (without administrator rights) was to:
- Close all instances of visual studio 2017
- Open project
- Clean
- Rebuild
- Run
Solution 15:[15]
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.
Solution 16:[16]
VS2017 and solution has .NET Core 1.1 web applications.
This did not help: Deleting .VS folder, removing all bin directories, restarting VS.
This helped: Installed latest SDK (.NET Core SDK 1.0.4) this issue got resolved.
I got this issue all of a sudden after a machine reboot followed by installing PHP for IIS, IIS URL Rewrite. But just try reinstalling the SDK – it might work fine with that itself, instead of going for the latest SDK.
Solution 17:[17]
I found the solution by reinstalling .NET CORE SDK
Solution 18:[18]
iisreset
in cmd as Administrator did the work for me.
Solution 19:[19]
In my case I accidentally install dotnet for x86 platform when my VS 2017 have x64. I reinstall dotnet for platform x64 and it works fine now.
Solution 20:[20]
If using IIS
instead of IIS Express
, just restart the service or:
- open IIS
- open your project folder from
Sites
tree view - select
site
- in
Manage Website
click onRestart
button
Solution 21:[21]
For whom is having problem with Visual Studio 2019 because was using the previous version of Visual Studio, jus delete the .vs folder that is in the root of the project and rerun the application, the problem must be resolved. That worked for me.
Solution 22:[22]
- I have removed the .vs folder from the project folder. It solved my issue.
- The .vs folder will be created when the project runs
Solution 23:[23]
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.
Solution 24:[24]
In my case there was a setting in web.config and timeout was not defined properly, TFS placeholder was there instead of actual value requestTimeout="00:06:00"
Here is what it looks like. Hope it will be helpfull
<system.webServer>
<handlers>
<remove name="aspNetCore"/>
<add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModule" resourceType="Unspecified"/>
</handlers>
<aspNetCore processPath="%LAUNCHER_PATH%" arguments="%LAUNCHER_ARGS%" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" requestTimeout="00:06:00" />
<httpRedirect enabled="false" />
</system.webServer>
Solution 25:[25]
I had this and it turns out I was in Release build. Changed to Debug build and it worked.
Solution 26:[26]
In my case, I just change modules="AspNetCoreModuleV2"
to modules="AspNetCoreModule"
and working fine. The final web.config looks like as below.
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.webServer>
<handlers>
<add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModuleV2" resourceType="Unspecified" />
</handlers>
<aspNetCore processPath="%LAUNCHER_PATH%" arguments="%LAUNCHER_ARGS%" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" forwardWindowsAuthToken="false" startupTimeLimit="3600" requestTimeout="23:00:00">
<environmentVariables />
</aspNetCore>
<httpProtocol>
<customHeaders>
<remove name="X-Powered-By" />
</customHeaders>
</httpProtocol>
</system.webServer>
</configuration>
Solution 27:[27]
I had to do a repair installation of .net core 2.2 sdk to fix this issue. Using VS 2017.
Solution 28:[28]
My problem resolved by:
Goto: .vs\config\applicationhost.config file and set overrideModeDefault to Allow instead of Deny
<section name="windowsAuthentication" overrideModeDefault="Allow" />
Solution 29:[29]
looks like you don't have <appSettings>
tag in your web.config. If you add that you will be able to resolve this problem.
For Example :
<appSettings>
<add key="TestKey" value="TestValue"/>
Solution 30:[30]
In my case the error returned was 503
, not 500
. It turned out that the application pool for the web site was using an account that had the password changed. Updating the password for the application pool identity resolved the issue.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow