Blazor server .NET6 Razor Class Library assets 404 error

Solution 1:

So my problem was with the way Azure was building the RCL solution and packaging the RCL in a nuget package.

I had to update my build YML to use 2022 image, and v6.0 of .NET and nuget:

Changed

pool:
  vmImage: 'windows-latest'

to

pool:
  vmImage: 'windows-2022'

and added

    - task: UseDotNet@2
      displayName: 'Use dotnet 6'
      inputs:
        version: '6.0.x'

and changed

    - task: NuGetToolInstaller@1

to

    - task: NuGetToolInstaller@1
      inputs:
        version: 6.0.0

and changed

    - task: VSBuild@1
      inputs:
        solution: '$(solution)'
        platform: '$(buildPlatform)'
        configuration: '$(buildConfiguration)'
        vsVersion: '17.0'

to

    - task: VSBuild@1
      inputs:
        solution: '$(solution)'
        platform: '$(buildPlatform)'
        configuration: '$(buildConfiguration)'