Started a project via cmd so not sure if it is a WebAssembly App or Server side app.
Anybody know how to check this in an easy way in Visual Studio/cmd?
You can open the .csproj file and look at the first line. Blazor Server App project is using Sdk="Microsoft.NET.Sdk.Web" but Blazor WebAssembly App is using Sdk="Microsoft.NET.Sdk.BlazorWebAssembly".
The quickest way is to look in Program.cs
Blazor WebAssembly:
var builder = WebAssemblyHostBuilder.CreateDefault(args);
Blazor Server:
var builder = WebApplication.CreateBuilder(args);
// Add services to the container.
builder.Services.AddRazorPages();
builder.Services.AddServerSideBlazor();
also, the presence of any .cshtml files, mainly Pages\_Host.cshtml, means it is a Blazor Server project.
There are several points in the project you can easily check.
Look for the line services.AddServerSideBlazor(); in ConfigureServices()
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With