Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. can't build blazor library in azure pipeline

can't build blazor library in azure pipeline

Scheduled Pinned Locked Moved ASP.NET
csharpvisual-studioannouncementasp-netcom
4 Posts 2 Posters 13 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    Super Lloyd
    wrote on last edited by
    #1

    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!

    S S 3 Replies Last reply
    0
    • S Super Lloyd

      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!

      S Offline
      S Offline
      Super Lloyd
      wrote on last edited by
      #2

      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 so

      ProjectA
      --> ProjectB --> ProjectC
      --> ProjectC

      Where ProjectC was the Blazor project, and ProjectA was the entry web project being compiled. Normally this is not a problem, but for Blazor it is, for some reason. So removed ProjectC as an explicit reference of ProjectA and it now compiles!

      A new .NET Serializer All in one Menu-Ribbon Bar Taking over the world since 1371!

      1 Reply Last reply
      0
      • S Super Lloyd

        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!

        S Offline
        S Offline
        Sernjijj Kabral
        wrote on last edited by
        #3

        You could relay, the instant ruling, as commerce, to especially, ruled out functions, even as kasspersky, and mcaffee

        1 Reply Last reply
        0
        • S Super Lloyd

          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!

          S Offline
          S Offline
          Sernjijj Kabral
          wrote on last edited by
          #4

          You could relay, the instant ruling, as commerce, to especially, ruled out functions, even as kasspersky, and mcaffee

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups