can't build blazor library in azure pipeline
-
When I try to build my project with azure pipeline (or even my PC), using that command line:
dotnet.exe publish C:\..\Produce.csproj --configuration Release -r win-x64 --self-contained true --output C:\..\Produce5
I got same version number as my computer and this error, all the time, almost immediately:
MSBuild version 17.7.1+971bf70db for .NET
...
C:\Program Files\dotnet\sdk\7.0.400\Sdks\Microsoft.NET.Sdk.BlazorWebAssembly\targets\Microsoft.NET.Sdk.BlazorWebAssembly.6_0.targets(325,5)
error MSB4018:
The "GenerateBlazorWebAssemblyBootJson" task failed unexpectedly. [C:\...\Parts.Production.Blazor.csproj]
System.IO.IOException: The process cannot access the file 'C:\..\Parts.Production.Blazor\obj\Release\net7.0\blazor.boot.json' because it is being used by another process. [C:\..\Parts.Production.Blazor.csproj]The funny thing is, the whole thing build fine with visual studio! Any idea what's wrong, or what I could do? Perhaps, Visual Studio 2022 is not using
Microsoft.NET.Sdk.BlazorWebAssembly.6_0.targets
and I too can avoid it with the command line? REMARK adding-maxcpucount:1
to the command line fixes this build job step, but it's a lot slower (obviously) and the whole solution pipeline build job still fails because it's now taking more than an hour... :rolleyes:A new .NET Serializer All in one Menu-Ribbon Bar Taking over the world since 1371!
-
When I try to build my project with azure pipeline (or even my PC), using that command line:
dotnet.exe publish C:\..\Produce.csproj --configuration Release -r win-x64 --self-contained true --output C:\..\Produce5
I got same version number as my computer and this error, all the time, almost immediately:
MSBuild version 17.7.1+971bf70db for .NET
...
C:\Program Files\dotnet\sdk\7.0.400\Sdks\Microsoft.NET.Sdk.BlazorWebAssembly\targets\Microsoft.NET.Sdk.BlazorWebAssembly.6_0.targets(325,5)
error MSB4018:
The "GenerateBlazorWebAssemblyBootJson" task failed unexpectedly. [C:\...\Parts.Production.Blazor.csproj]
System.IO.IOException: The process cannot access the file 'C:\..\Parts.Production.Blazor\obj\Release\net7.0\blazor.boot.json' because it is being used by another process. [C:\..\Parts.Production.Blazor.csproj]The funny thing is, the whole thing build fine with visual studio! Any idea what's wrong, or what I could do? Perhaps, Visual Studio 2022 is not using
Microsoft.NET.Sdk.BlazorWebAssembly.6_0.targets
and I too can avoid it with the command line? REMARK adding-maxcpucount:1
to the command line fixes this build job step, but it's a lot slower (obviously) and the whole solution pipeline build job still fails because it's now taking more than an hour... :rolleyes:A new .NET Serializer All in one Menu-Ribbon Bar Taking over the world since 1371!
Well.. Turns out it's just
dotnet publish
having an issue with dependencies... We had A depending on B and C and B depending on C like soProjectA
--> ProjectB --> ProjectC
--> ProjectCWhere
ProjectC
was the Blazor project, andProjectA
was the entry web project being compiled. Normally this is not a problem, but for Blazor it is, for some reason. So removedProjectC
as an explicit reference ofProjectA
and it now compiles!A new .NET Serializer All in one Menu-Ribbon Bar Taking over the world since 1371!
-
When I try to build my project with azure pipeline (or even my PC), using that command line:
dotnet.exe publish C:\..\Produce.csproj --configuration Release -r win-x64 --self-contained true --output C:\..\Produce5
I got same version number as my computer and this error, all the time, almost immediately:
MSBuild version 17.7.1+971bf70db for .NET
...
C:\Program Files\dotnet\sdk\7.0.400\Sdks\Microsoft.NET.Sdk.BlazorWebAssembly\targets\Microsoft.NET.Sdk.BlazorWebAssembly.6_0.targets(325,5)
error MSB4018:
The "GenerateBlazorWebAssemblyBootJson" task failed unexpectedly. [C:\...\Parts.Production.Blazor.csproj]
System.IO.IOException: The process cannot access the file 'C:\..\Parts.Production.Blazor\obj\Release\net7.0\blazor.boot.json' because it is being used by another process. [C:\..\Parts.Production.Blazor.csproj]The funny thing is, the whole thing build fine with visual studio! Any idea what's wrong, or what I could do? Perhaps, Visual Studio 2022 is not using
Microsoft.NET.Sdk.BlazorWebAssembly.6_0.targets
and I too can avoid it with the command line? REMARK adding-maxcpucount:1
to the command line fixes this build job step, but it's a lot slower (obviously) and the whole solution pipeline build job still fails because it's now taking more than an hour... :rolleyes:A new .NET Serializer All in one Menu-Ribbon Bar Taking over the world since 1371!
You could relay, the instant ruling, as commerce, to especially, ruled out functions, even as kasspersky, and mcaffee
-
When I try to build my project with azure pipeline (or even my PC), using that command line:
dotnet.exe publish C:\..\Produce.csproj --configuration Release -r win-x64 --self-contained true --output C:\..\Produce5
I got same version number as my computer and this error, all the time, almost immediately:
MSBuild version 17.7.1+971bf70db for .NET
...
C:\Program Files\dotnet\sdk\7.0.400\Sdks\Microsoft.NET.Sdk.BlazorWebAssembly\targets\Microsoft.NET.Sdk.BlazorWebAssembly.6_0.targets(325,5)
error MSB4018:
The "GenerateBlazorWebAssemblyBootJson" task failed unexpectedly. [C:\...\Parts.Production.Blazor.csproj]
System.IO.IOException: The process cannot access the file 'C:\..\Parts.Production.Blazor\obj\Release\net7.0\blazor.boot.json' because it is being used by another process. [C:\..\Parts.Production.Blazor.csproj]The funny thing is, the whole thing build fine with visual studio! Any idea what's wrong, or what I could do? Perhaps, Visual Studio 2022 is not using
Microsoft.NET.Sdk.BlazorWebAssembly.6_0.targets
and I too can avoid it with the command line? REMARK adding-maxcpucount:1
to the command line fixes this build job step, but it's a lot slower (obviously) and the whole solution pipeline build job still fails because it's now taking more than an hour... :rolleyes:A new .NET Serializer All in one Menu-Ribbon Bar Taking over the world since 1371!
You could relay, the instant ruling, as commerce, to especially, ruled out functions, even as kasspersky, and mcaffee