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 Expres
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.
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.
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 for me was to close visual studio 2017, and reopen the solution. :)
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.
Just close VS delete the project.lock.json file, open VS the file will be restored and you shouldn't have problems anymore.