asp.netvisual-studiowebforms

ASP.NET run issue


I'm having an issue with my ASP.NET webforms project in Visual Studio 2022 (using .NET Framework). When I initially create the project, the run button shows the browser name and runs smoothly.

However, after closing and reopening the project, the run button shows the selected file name instead of the browser, and the project refuses to run. I am unable to change it back to the browser.

How can I resolve this issue?


Solution

  • You could open and run your project as follows.

    File->Open->Project/Solution…->Select the .sln folder and open(The .sln folder is in the same directory as your ASP.NET webforms folder)

    After opening, find your project in Solution Explorer on the right. Right click and click Set as Startup Project.

    Run the project