Open crosscuttech opened 1 year ago
As a work around:
Create a new Storage Account in Azure with a Static Site. In Devops, disable the AzureStaticWebApp@0 task in the Release Pipeline. Add a AzureFileCopy@3 Task in exactly the same spot (after the file transformations). Point the AzureFileCopy@3 Task to the new Storage site.
Once I did that, my code is getting uploaded with the proper file transformations.
I'm attempting to deploy a Blazor WASM app to an Azure Static Web App. I've got a working pipeline that will Restore/Build/Test/Publish my Blazor project and a Release pipeline that will take the published artifact and deploy it to various development/test/stage environments. Within the Release pipeline, I need to update a key in my appsettings.json for each targeted environment. This is what my committed appsettings.json looks like:
{ "HttpClient": { "BaseAddress": "" } }
For my release pipeline, I have the following tasks for my Agent Job:
Each of these tasks appear to complete successfully but the BaseAddress key is blank on deployed code because the application crashes. If I disable the Transform Appsettings step, commit a valid, working URL to the appsettings.json, and deploy that release, everything works. I've also tried swapping around the extract and transforms steps and that doesn't seem to work either.
Here's the YML for the tasks in the Release pipeline:
Here's the log output from the powershell script:
Here's the log from the Static Web App: