0

I am having problems debugging my web applications.

When I try to Debug my website I get an error saying:

The system cannot find the specified file

The system cannot find the specified file

Now when I try to Debug again, there will be no error and it tries to open the page, but it doesn't load because IIS is not on.

And when IIS is on and I press the debug the page loads fine, but it doesn't hit the breakpoints I set.

Also the start button doesn't say "Google Chrome", but just "Start" start button

I thought this was only with this project, but this also happens in my other ASP.NET MVC Project.

I've tried restarting Visual Studio and my laptop, but that didn't solve it either. I also tried cleaning and rebuilding the solution.

Has anybody experienced this problem before?

SHEePYTaGGeRNeP
  • 320
  • 3
  • 14

1 Answers1

1

Your problem with the Debug button showing "Start" occurs only if you set the Application Startup¹ to:

  • a WPF project or
  • a WindowsForms project or
  • a ClassLibrary project or something like this.

Otherwise, your WebApplication project or solution needs a review. Did you check these files? If not, check the configurations. See the Start Action in Web as the image below².

Web Application Properties

Another tips I can give you is to always Build your project during coding to see if everything is OK and sometimes do a Clean Solution and Rebuild it. When something is not correct, try restarting your Visual Studio or disabling some extensions.

Also, here are a few questions to help you too:

Some of the answers even when not accepted can help you clarify why did you get this issue.

Hope this can be useful and I am glad you've solved the problem. Now, try to understand it.

--

  1. You can set the Application Startup project by right-clicking the project in the solution and then click "Set as StartUp project".
  2. To view the Project Properties as shown, right-click the project in the solution and then click "Properties" or select the project in the solution and use the shotcut ALT + ENTER.
Community
  • 1
  • 1
Lincoln Pires
  • 338
  • 4
  • 15
  • I added a new project and forget to change Startup Project. I changed Startup Project, but that didn't fix it. – SHEePYTaGGeRNeP Jan 06 '15 at 08:41
  • 1
    I removed and added the project and set it as Startup Project and it worked. Thanks! – SHEePYTaGGeRNeP Jan 06 '15 at 08:57
  • Hey! Thanks for reply. Good that you found the problem. Let's keep learning. – Lincoln Pires Jan 08 '15 at 15:47
  • Too bad I have to do it everytime I open the solution though ( if I select from recent solutions, didn't try anything else yet ) – SHEePYTaGGeRNeP Jan 08 '15 at 19:50
  • 1
    Hum... This can be because of your .suo options: See the most voted answer here: [link](http://stackoverflow.com/questions/694730/why-is-set-as-startup-option-stored-in-the-suo-file-and-not-the-sln-file) Or uncheck the option in your Visual Studio: **Tools > Options > Projects and Solutions > Build and Run > For new solutions use the currently selected project as the startup project.** – Lincoln Pires Jan 09 '15 at 10:47