In my solution I basically have two projects, the one I'm coding on, and the startup project, Startup.csproj
. I have Startup.csproj
configured to use Local IIS
for debugging, and I normally just attach to the worker process to debug.
However, at random intervals, the Startup.csproj
defaults back to IIS Express for debugging. It does not show as a change in the Startup.csproj
project file, and sometimes even still shows Local IIS
but fails with a "Cannot list contents of directory" error.
I'm running VS 2017 v15.9.15. What could be causing this annoying little phenomenon?
Go to Project Properties > Debug > Uncheck "Launch Browser" > Save. Save this answer.
To start debugging, select IIS Express (<Browser name>) or Local IIS (<Browser name>) in the toolbar, select Start Debugging from the Debug menu, or press F5. The debugger pauses at the breakpoints. If the debugger can't hit the breakpoints, see Troubleshoot debugging.
I thought I am going crazy. I found the settings driving that behavior in the project file. I set the UseIISExpress to 'false' and the other one all the way at the end of the file project UseIIS to 'true' and when reloading still set to use IISExpress.
Turns out there's a <ProjectFile>.csproj.user that will overwrite default settings. Search for the UseIISExpress in this file and set it to false and Voila! problem solved.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With