Search code examples
azure-devopsblazorazure-pipelineswebassemblyblazor-hosted

Blazor WASM YAML Build fails


I try to establish a Blazor WASM Build on a YAML Pipeline on DevOps. At the Moment I use the Boiler Plate Project for Blazor WASM and a very simple build Task: - task: Bash@3 displayName: Build CMS inputs: targetType: 'inline' script: 'dotnet publish $(solution) -f net7.0 -c WebRelease'

Locally I have no Problems. But on the Server there is allways an error like this: C:\Program Files\dotnet\sdk\7.0.306\Sdks\Microsoft.NET.Sdk.BlazorWebAssembly\targets\Microsoft.NET.Sdk.BlazorWebAssembly.6_0.targets(238,5): error : The process cannot access the file 'D:\a\1\s...\Client\obj\Release\net7.0\build-gz\ZmnGp8l6.gz' because it is being used by another process. [D:\a\1\s...\Client....csproj]

What am I doing wrong?

In an other scenario, where I removed the Commons Project, the concurrency error referenced the "...client.dll". But anyway I would never expected souch a multi process exception.


Solution

  • I found out, that the build works if I reference only the project (containing the server), not the solution. It will automatically build the referenced projects as well and succeeds.