Conflicting assets with the same target path after upgrading Blazor from .net 5 to .net 6

See original GitHub issue

I have spent a long time trying to figure what is the problem, looking for similar issues, but just could not find the answer.

Describe the bug

I have Blazor WASM hosted, with a couple of Razor Class Libraries which uses Shared project which references some .net framework library CIBWM.Markets.FxF.Adapters.FxSales.Contracts. There are no multiple runnable wasm clients so I have no idea what is causing this problem.

What I did

Just switched Blazor Client and Blazor Server from .net5.0 to .net6.0, upgrade nugget packages

Exceptions (if any)

Conflicting assets with the same target path ‘_framework/CIBWM.Markets.FxF.Adapters.FxSales.Contracts.pdb’. For ‘Build’ assets ‘Identity: C:\Users\ab017jh\Source\Repos\fxonfront\src\FxSalesBlazorWasm\FxSalesBlazor.Client\bin\Debug\wwwroot_framework\CIBWM.Markets.FxF.Adapters.FxSales.Contracts.pdb, SourceType: Computed, SourceId: FxSalesBlazor.Client, ContentRoot: C:\Users\ab017jh\Source\Repos\fxonfront\src\FxSalesBlazorWasm\FxSalesBlazor.Client\bin\Debug\wwwroot, BasePath: lol, RelativePath: _framework/CIBWM.Markets.FxF.Adapters.FxSales.Contracts.pdb, AssetKind: Build, AssetMode: All, AssetRole: Primary, RelatedAsset: , AssetTraitName: BlazorWebAssemblyResource, AssetTraitValue: symbol, CopyToOutputDirectory: PreserveNewest, CopyToPublishDirectory: Never, OriginalItemSpec: C:\Users\ab017jh\Source\Repos\fxonfront\src\FxSales\Application.Common.Interfaces\bin\Debug\CIBWM.Markets.FxF.Adapters.FxSales.Contracts.pdb’ and ‘Identity: C:\Users\ab017jh\Source\Repos\fxonfront\src\FxSalesBlazorWasm\FxSalesBlazor.Client\bin\Debug\wwwroot_framework\CIBWM.Markets.FxF.Adapters.FxSales.Contracts.pdb, SourceType: Computed, SourceId: FxSalesBlazor.Client, ContentRoot: C:\Users\ab017jh\Source\Repos\fxonfront\src\FxSalesBlazorWasm\FxSalesBlazor.Client\bin\Debug\wwwroot, BasePath: lol, RelativePath: _framework/CIBWM.Markets.FxF.Adapters.FxSales.Contracts.pdb, AssetKind: Build, AssetMode: All, AssetRole: Primary, RelatedAsset: , AssetTraitName: BlazorWebAssemblyResource, AssetTraitValue: symbol, CopyToOutputDirectory: PreserveNewest, CopyToPublishDirectory: Never, OriginalItemSpec: C:\Users\ab017jh\Source\Repos\fxonfront\src\FxSales\Application.Common.Interfaces\bin\Debug\CIBWM.Markets.FxF.Adapters.FxSales.Contracts.pdb’. FxSalesBlazor.Client C:\Program Files\dotnet\sdk\6.0.100\Sdks\Microsoft.NET.Sdk.Razor\targets\Microsoft.NET.Sdk.Razor.StaticWebAssets.targets 411

Further technical details

  • visual studio 2022
dotnet --info Output
.NET SDK (reflecting any global.json):
 Version:   6.0.100
 Commit:    9e8b04bbff

Runtime Environment:
 OS Name:     Windows
 OS Version:  10.0.19042
 OS Platform: Windows
 RID:         win10-x64
 Base Path:   C:\Program Files\dotnet\sdk\6.0.100\

Host (useful for support):
  Version: 6.0.0
  Commit:  4822e3c3aa

.NET SDKs installed:
  3.1.102 [C:\Program Files\dotnet\sdk]
  5.0.401 [C:\Program Files\dotnet\sdk]
  6.0.100 [C:\Program Files\dotnet\sdk]

.NET runtimes installed:
  Microsoft.AspNetCore.All 2.1.30 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
  Microsoft.AspNetCore.App 2.1.30 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 3.1.2 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 3.1.19 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 3.1.21 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 5.0.10 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 5.0.12 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 6.0.0 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 2.1.30 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 3.1.2 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 3.1.19 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 3.1.21 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 5.0.10 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 5.0.12 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 6.0.0-rc.1.21451.13 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 6.0.0 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.WindowsDesktop.App 3.1.2 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
  Microsoft.WindowsDesktop.App 3.1.19 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
  Microsoft.WindowsDesktop.App 3.1.21 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
  Microsoft.WindowsDesktop.App 5.0.10 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
  Microsoft.WindowsDesktop.App 5.0.12 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
  Microsoft.WindowsDesktop.App 6.0.0 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:22 (11 by maintainers)

github_iconTop GitHub Comments

3reactions
msftbot[bot]commented, May 24, 2022

Thanks for contacting us.

We’re moving this issue to the .NET 7 Planning milestone for future evaluation / consideration. We would like to keep this around to collect more feedback, which can help us with prioritizing this work. We will re-evaluate this issue, during our next planning meeting(s). If we later determine, that the issue has no community involvement, or it’s very rare and low-impact issue, we will close it - so that the team can focus on more important and high impact issues. To learn more about what to expect next and how this issue will be handled you can read more about our triage process here.

3reactions
malovicgcommented, Jan 23, 2022

Issue can be manifested easily in two steps (VS 2022, .NET 6):

  1. Create blazor wasm hosted project with individual accounts.
  2. In Server project -> Add -> New Scaffolded Item -> Identity -> Add -> Overwrite All files => Select DbContext -> Add.

Try to rebuild -> Conflicting assets error.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Conflicting assets with the same target path after upgrading ...
I have Blazor WASM hosted, with a couple of Razor Class Libraries which uses Shared project which references some .net framework library ...
Read more >
Error in upgrading an asp.net 5 project to .net 6
Error in upgrading an asp.net 5 project to .net 6 : "Conflicting assets with the same target path" ... My project was in...
Read more >
Conflicting Assets - Radzen IDE (Blazor server-side)
Conflicting assets with the same target path after upgrading Blazor from .net 5 to .net 6 ... Thank you for you quick response!...
Read more >
Static Web Asset has a conflicting web root path - Telerik UI for ...
Cause\Possible Cause(s)​​ The issue is that the project has the _content folder in the wwwroot folder and the Telerik static assets are copied...
Read more >
Blazor: Updated validation logic for static web assets - .NET
The issue: Prevented proper conflict detection between the host assets and assets from Razor Class Libraries (RCLs) and Blazor WebAssembly apps.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found