My Blazor projects uses a Razor Class Library. After updating Blazor from 3.2.0 preview to 3.2.0 I'm getting:
Duplicate base paths '/' for content root paths
The error also shows paths including
...\bin\Debug\netstandard2.1\wwwroot\
I upgraded both the Blazor project and the razor lib from:
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="3.2.0-preview3.20168.3" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Build" Version="3.2.0-preview3.20168.3" PrivateAssets="all" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="3.2.0-preview3.20168.3" PrivateAssets="all" />
</ItemGroup>
To
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="3.2.0" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Build" Version="3.2.0" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="3.2.0" />
</ItemGroup>
It is still working, when I publish my Razor library to Azure DevOps and include it in my Blazor project with Nuget. It only fails when I add & reference the project. It used to work in both cases.
I had to remove all the WebAssembly stuff from my Razor class library:
Working:
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Components" Version="3.1.3" />
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="3.1.3" />
</ItemGroup>
Credit goes to Jan-Willem Spuij @jspuij
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With