Closed mattfrear closed 10 months ago
Hi @mattfrear, you are attempting to deploy a Blazor Web App which requires to be hosted on a server (such as App Service) and can't be hosted on Static Web Apps. To host Blazor on Static Web Apps, you must use the WebAssembly mode, which is documented in our docs https://learn.microsoft.com/en-us/azure/static-web-apps/deploy-blazor and in this blog post https://techcommunity.microsoft.com/t5/apps-on-azure-blog/build-and-deploy-net-8-blazor-wasm-apps-with-serverless-apis/ba-p/3988412. This mode compiles to static assets that can be hosted on Azure Static Web Apps
Hi Thomas. Thank you for that. I realised that I had to use WebAssembly after I raised this issue. I was attempting to do so by choosing the WebAssembly Interactive Render mode in the "Blazor Web App" project template.
I didn't know I was supposed to use the "Blazor WebAssembly Standalone App" project template instead, as per your blog post. Thanks! I will try again using that template, as well as read through the rest of your blob post.
Describe the bug I cannot deploy a brand new .NET 8 Blazor app to Azure Static Web apps using Azure Devops.
A clear and concise description of what the bug is.
To Reproduce Steps to reproduce the behavior:
Outcome The AzureStaticWebApp@0 module errors with:
Expected behavior I expect the app to deploy and run.
I have experimented and tried adding a static index.html to my wwwroot folder, but if I do that then the deploy succeeds - I can see the index.html file. But it's not successful as I can't run my Blazor app.
Is there a way to tell the AzureStaticWebApp@0 module to look for something other than an index.html file? Although, I'm not sure what that should be.
FYI when I publish the VS solution locally, this is the content of my published folder: and