dotnet / sdk

Core functionality needed to create .NET Core projects, that is shared between Visual Studio and CLI
https://dot.net/core
MIT License
2.71k stars 1.07k forks source link

Conflicting assets with the same target path #22702

Open unixbob opened 2 years ago

unixbob commented 2 years ago

Describe the bug

with no additional code, a fresh Blazor WASM 6 fails to start when identity is scaffolded

To Reproduce

Create a new Blazor hosted WebAssembly Project with individual accounts, first activity is to select the server project, add scaffolded item and scaffold identity. When that process finishes, type "dotnet watch run" in the console and it fails with a conflcting favicon.ico error

Exceptions (if any)

C:\Program Files\dotnet\sdk\6.0.100\Sdks\Microsoft.NET.Sdk.Razor\targets\Microsoft.NET.Sdk.Razor.StaticWebAssets.targets(411,5): error : Conflicting assets with the same target path 'favicon.ico'. For assets 'Identity: C:\Users\roreyno\source\repos\vision2success\vision2success\Client\wwwroot\favicon.ico, SourceType: Project, SourceId: vision2success.Client, ContentRoot: C:\Users\roreyno\source\repos\vision2success\vision2success\Client\wwwroot\, BasePath: /, RelativePath: favicon.ico, AssetKind: All, AssetMode: All, AssetRole: Primary, RelatedAsset: , AssetTraitName: , AssetTraitValue: , CopyToOutputDirectory: Never, CopyToPublishDirectory: PreserveNewest, OriginalItemSpec: wwwroot\favicon.ico' and 'Identity: C:\Users\roreyno\source\repos\vision2success\vision2success\Server\wwwroot\favicon.ico, SourceType: Discovered, SourceId: vision2success.Server, ContentRoot: C:\Users\roreyno\source\repos\vision2success\vision2success\Server\wwwroot\, BasePath: _content/vision2success.Server, RelativePath: favicon.ico, AssetKind: All, AssetMode: All, AssetRole: Primary, RelatedAsset: , AssetTraitName: , AssetTraitValue: , CopyToOutputDirectory: Never, CopyToPublishDirectory: PreserveNewest, OriginalItemSpec: wwwroot\favicon.ico' from different projects. [C:\Users\roreyno\source\repos\vision2success\vision2success\Server\vision2success.Server.csproj]

Further technical details

dotnet --info .NET SDK (reflecting any global.json): Version: 6.0.100 Commit: 9e8b04bbff

Runtime Environment: OS Name: Windows OS Version: 10.0.19043 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: 5.0.201 [C:\Program Files\dotnet\sdk] 6.0.100 [C:\Program Files\dotnet\sdk]

.NET runtimes installed: 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 5.0.12 [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 6.0.0 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]

dotnet-issue-labeler[bot] commented 2 years ago

I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label.