Visual Studio. Blazor WASM debug runs incorrect project if blazor projects not alone in the solution.

Andrei Hulidau 1 Reputation point
2021-05-24T16:05:58.867+00:00

Hello.
My solution contains several projects:

  1. Console application
  2. BlazorWebAssembly.Client
  3. BlazorWebAssembly.Server
  4. BlazorWebAssembly.Shared

When I am trying to debug Blazor app I do the following steps:

  1. Right click on the "BlazorWebAssembly.Server"
  2. Select "Set as Startup project" option.
  3. Click on the button on the image: 99221-image.png

But after that, the default project switches to my console app and runs it. How can I run my blazor server using visual studio in that case?
Visual Studio Version 16.9.6

Upd. If right click on the server project and select "Debug/Start new instance" it works. But it is weird that it doesn't work the way described above.

Blazor
Blazor
A free and open-source web framework that enables developers to create web apps using C# and HTML being developed by Microsoft.
1,549 questions
Visual Studio Debugging
Visual Studio Debugging
Visual Studio: A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.Debugging: The act or process of detecting, locating, and correcting logical or syntactical errors in a program or malfunctions in hardware. In hardware contexts, the term troubleshoot is the term more frequently used, especially if the problem is major.
987 questions
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.