Search code examples
asp.net-coreblazor-webassembly

How to run frontend and backend in Visual Studio


I am new to Blazor (frontend) and ASP.NET Core (backend) and I can't seem to be run both projects from within Visual Studio at the same time to test the product.

Any ideas?


Solution

  • When you use Visual to create Blazor, you will see the option Asp.net core hosted, if so, your solution will have 3 project in total. Then you only need to run the server project by default.

    enter image description here

    But if you created a wasm blazor app without asp.net core hosted and you manually created another asp.net core project inside the same solution, then you may need to right click on the solution and Set startup projects and choose all the projects

    enter image description here enter image description here