1

When I run a console app in the debugger in VS 2015 Update 3, it takes 1-2 minutes to start and I see IIS Express starting/stopping many times (blinks in and out in the system tray). IIS Express is not started when the debugger finally gets into my code.

This happens with other project types as well such as MVC apps.

Has anyone seen this and fixed it?

Bill Needels
  • 505
  • 4
  • 13
  • Do you shut down IIS after each debug session? I have had it behave poorly at times, and in some instances need to shut it down between debugs. Which version are you using? 10 seems to be working MUCH better than the older versions. – htm11h Jul 07 '17 at 15:30
  • I think that is likely not applicable as the project is a console app and the offending behavior is the debugger starting up iisexpress.exe many times. I did try stopping IIS from IIS Manager to see what would happen - same behavior. – Bill Needels Jul 07 '17 at 15:36
  • Hmm...I tried a console app in a different (new) project/solution. No repro on the problem. Thinking now this is likely something to do with the solution containing the console app or one of the other (web) projects in that solution. Will dig into it. News at 11. – Bill Needels Jul 07 '17 at 16:16
  • Tried the various solutions at [Prevent iisexpress from running the websites in a solution when the startup app is a console app](https://stackoverflow.com/questions/24330919/prevent-iisexpress-from-running-the-websites-in-a-solution-when-the-startup-app) with no effect. Continuing to look into it. – Bill Needels Jul 07 '17 at 18:44
  • @Bill, Do you mean that it still starts the IIS express after you set "Always Start When Debugging=False" for all the web project or web site? Not debug your app, just run your using "start without debugging(Ctrl+F5)", how about the result? Another issue is that if you debug your console app, whether other web site or projects start the page in the browser? Maybe you set multiple startup project in your solution property. If possible, you could reset your VS settings and then set "Always Start When Debugging=False" for all web projects or web site in your solution, debug it again. – Jack Zhai Jul 10 '17 at 05:59
  • Are all of the web projects at the same .Net level? Older (web) projects might still be looking for Cassini or an older version of IIS? (Just a thought.) – htm11h Jul 10 '17 at 15:24
  • @JackZhai-MSFT, yes. It still attempts to start IIS Express multiple times, despite having set "Always Start When Debugging=False" on all web projects in the solution. Ctrl-F5 works fine, but then I'm not debugging, which is what I need to do. – Bill Needels Jul 13 '17 at 13:42
  • @Bill Needels, Any update? Would you please share the latest information about this issue? – Jack Zhai Jul 25 '17 at 03:14

2 Answers2

0

I just provide some solution, if possible, you could test it in your side:

(1) Just create a new blank solution, and then add all projects to this new blank solution.

(2) Please make sure that whether all web projects have the same issue in your previous solution, if just the specific web project in this solution has this issue, maybe you could remove it and add a new one directly.

(3) Just reset your VS settings:https://msdn.microsoft.com/en-us/library/ms247075(v=vs.100).aspx, and then re-debug your project, view the result.

(4) Since you set the property "Always Start When Debugging=False", like my previous suggestion, please make sure that you don't set several projects as the start up project in your side.

enter image description here

Jack Zhai
  • 6,230
  • 1
  • 12
  • 20
0

Deleting .vs folder (or especially .vs/config/applicationhost.config file) at the solution folder worked for me. Note that .vs folder is hidden

Aidar
  • 1
  • This does not provide an answer to the question. You can [search for similar questions](https://stackoverflow.com/search), or refer to the related and linked questions on the right-hand side of the page to find an answer. If you have a related but different question, [ask a new question](https://stackoverflow.com/questions/ask), and include a link to this one to help provide context. See: [Ask questions, get answers, no distractions](https://stackoverflow.com/tour) – Shanteshwar Inde Sep 05 '19 at 12:06