BlazorWASM wwwroot has no index.html, works in dev still? Published version just shows files

456 Views Asked by At

I am trying to figure out how to get the published BlazorWASM app to show the actual client on the ip. Right now it just shows all the files and everywhere I look it says modify index.html. I come from React so naturally this was the same there too, there is an index.html and everything is rendered to the body of the page, but BlazorWASM project I have doesn't have an index.html? It still works when I run it in dev mode. But the published version just shows the all the directories and files in wwwroot? Is there something obvious I am doing wrong?

Looked for index.html through whole project.

Tried dotnet run / dotnet serve in root of published project as well as in wwwroot

Works as expected in dev unpublished project.

1

There are 1 best solutions below

0
On

I realized all this time I ended up making Blazor Server rather than WASM. Blazor Server does not have index.html where as WASM does. And if you are familiar with dlls and stuff for windows, blazor server publish spits out dlls whereas WASM spits out html, css, and js files.