{"id":3400,"date":"2021-08-31T16:56:20","date_gmt":"2021-08-31T16:56:20","guid":{"rendered":"https:\/\/www.petecodes.co.uk\/?p=3400"},"modified":"2021-08-31T17:24:10","modified_gmt":"2021-08-31T17:24:10","slug":"deploying-an-asp-net-blazor-app-to-azure-using-octopus-deploy-part-4-create-and-package-a-blazor-webassembly-app","status":"publish","type":"post","link":"https:\/\/www.petecodes.co.uk\/deploying-an-asp-net-blazor-app-to-azure-using-octopus-deploy-part-4-create-and-package-a-blazor-webassembly-app\/","title":{"rendered":"Deploying an ASP.NET Blazor App to Azure using Octopus Deploy – Part 4 – Create and Package a Blazor WebAssembly App"},"content":{"rendered":"\n
In this series of posts we’re running through how to get Octopus Deploy<\/a> setup, along with the required Azure Services, in order to deploy an ASP.NET Blazor app to Dev, Staging and Production environments.<\/p>\n\n\n\n In the previous post we created our Azure Web Apps for Development, Staging and Production.<\/p>\n\n\n\n We then went on to complete our Development Deployment Target as well as create Staging and Production Deployment Targets.<\/p>\n\n\n\n In this post we’ll create our Blazor WebAssembly Web App and Package it up ready to upload to Octopus Deploy.<\/p>\n\n\n\n Part 1 – Environments and Deployment Targets<\/a> Once again, for this tutorial you’ll need the following;<\/p>\n\n\n\n Now that we’ve got our major Octopus Deploy moving parts set up, we can go ahead and create our Blazor App.<\/p>\n\n\n\n If we head over to the terminal, we can create our new Blazor Web Assembly app with the following command;<\/p>\n\n\n\n This will create a new Blazor WebAssembly app in the petecodes directory. <\/p>\n\n\n\n If we enter that directory with;<\/p>\n\n\n\n We can then run our new application with;<\/p>\n\n\n\n The app will start running;<\/p>\n\n\n\nWhat we’re doing this time<\/h2>\n\n\n\n
Contents<\/h2>\n\n\n\n
Part 2 – Linking Azure<\/a>
Part 3 – Create Azure Web Apps + Staging and Production Deployment Targets<\/a>
Part 4 – Create and Package a Blazor WebAssembly App<\/a>
Part 5 – Octopus Deploy Projects, Variables and Processes<\/a>
Part 6 – Create a Release<\/a>
Part 7 – Send a Notification to Microsoft Teams<\/a><\/p>\n\n\n\nPrerequisites<\/h2>\n\n\n\n
Create a Blazor Web Assembly App<\/h2>\n\n\n\n
dotnet new blazorwasm -o petecodes<\/code><\/pre><\/div>\n\n\n\n
cd petecodes<\/code><\/pre><\/div>\n\n\n\n
dotnet run<\/code><\/pre><\/div>\n\n\n\n