Skip to content

[dotnet-sdk-10.0.100-preview.5.25272.110] Apps build failed with error "Conflicting assets with the same target path" #62138

Closed as not planned
@Junjun-zhao

Description

@Junjun-zhao

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

Starting from .NET 10 Preview 4, building the third-party applications with the latest .NET 10 build, it fails with error "Conflicting assets with the same target path" if there are two wwwroot folders.

Application Name: grandnode2, OpenMU
OS: Windows 10 21H2
CPU: X64
.NET Build Number: dotnet-sdk-10.0.100-preview.5.25272.110
App Source checking at: https://devdiv.visualstudio.com/DevDiv/_workitems/edit/2492267
Or Github Link:
https://github.com/grandnode/grandnode2
https://github.com/MUnique/OpenMU

Verify Scenarios:
1). Windows 10 21H2 AMD64 + dotnet-sdk-8.0.400: Pass
2). Windows 10 21H2 AMD64 + dotnet-sdk-9.0.104: Pass
3). Windows 10 21H2 AMD64 + dotnet-sdk-10.0.100-preview.3.25201.16: Pass
4). Windows 10 21H2 AMD64 + dotnet-sdk-10.0.100-preview.4.25258.110: Fail
5). Windows 10 21H2 AMD64 + dotnet-sdk-10.0.100-preview.5.25272.110: Fail

Expected Behavior

Build successfully.

Steps To Reproduce

App Repro Steps:
The machine has dotnet-sdk-10.0.100-preview.5.25272.110 installed.

  1. Run command "dotnet build" in grandnode2\src\Web\Grand.Web.

Demo Repro Steps: (Demo attached: WebDemo)
The machine has dotnet-sdk-10.0.100-preview.5.25272.110 installed.

  1. Create asp .net web 8.0 project WebApp01 and asp .net web 8.0 project WebApp02.
  2. WebApp01 references WebApp02.
  3. Build WebApp01.

Exceptions (if any)

Build failed with error:

Conflicting assets with the same target path 'assets/images/flags/ad#[.{fingerprint}]?.png'. For assets 'Identity: D:\grandnode2\src\Web\Grand.Web.Admin\wwwroot\assets\images\flags\ad.png, SourceType: Project, SourceId: Grand.Web.Admin, ContentRoot: D:\grandnode2\src\Web\Grand.Web.Admin\wwwroot\, BasePath: /, RelativePath: assets/images/flags/ad#[.{fingerprint}]?.png, AssetKind: All, AssetMode: All, AssetRole: Primary, AssetRole: , AssetRole: , RelatedAsset: , AssetTraitName: , AssetTraitValue: , Fingerprint: 1smjfebmi3, Integrity: EZFwYCjTmh1ez2xocsIWUdYRgowFz+BGwrL1GuPYpNI=, FileLength: 326, LastWriteTime: 8/8/2024 2:51:31 AM +00:00, CopyToOutputDirectory: Never, CopyToPublishDirectory: PreserveNewest, OriginalItemSpec: wwwroot\assets\images\flags\ad.png' and 'Identity: D:\grandnode2\src\Web\Grand.Web.Vendor\wwwroot\assets\images\flags\ad.png, SourceType: Project, SourceId: Grand.Web.Vendor, ContentRoot: D:\grandnode2\src\Web\Grand.Web.Vendor\wwwroot\, BasePath: /, RelativePath: assets/images/flags/ad#[.{fingerprint}]?.png, AssetKind: All, AssetMode: All, AssetRole: Primary, AssetRole: , AssetRole: , RelatedAsset: , AssetTraitName: , AssetTraitValue: , Fingerprint: 1smjfebmi3, Integrity: EZFwYCjTmh1ez2xocsIWUdYRgowFz+BGwrL1GuPYpNI=, FileLength: 326, LastWriteTime: 8/8/2024 2:51:58 AM +00:00, CopyToOutputDirectory: Never, CopyToPublishDirectory: PreserveNewest, OriginalItemSpec: wwwroot\assets\images\flags\ad.png' from different projects.

.NET Version

10.0.100-preview.5.25272.110

Anything else?

Findings:
If delete grandnode2\src\Web\Grand.Web.Vendor\wwwroot and grandnode2\src\Web\Grand.Web.Admin\wwwroot, Grand.Web can build successfully.

Dotnet Info:

.NET SDK:
 Version:           10.0.100-preview.5.25272.110
 Commit:            35674fa72e
 Workload version:  10.0.100-manifests.f4c93f91
 MSBuild version:   17.15.0-preview-25272-110+35674fa72

Runtime Environment:
 OS Name:     Windows
 OS Version:  10.0.19045
 OS Platform: Windows
 RID:         win-x64
 Base Path:   C:\Program Files\dotnet\sdk\10.0.100-preview.5.25272.110\

Host:
  Version:      10.0.0-preview.5.25272.110
  Architecture: x64
  Commit:       35674fa72e

.NET SDKs installed:
  10.0.100-preview.5.25272.110 [C:\Program Files\dotnet\sdk]

.NET runtimes installed:
  Microsoft.AspNetCore.App 10.0.0-preview.5.25272.110 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 10.0.0-preview.5.25272.110 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.WindowsDesktop.App 10.0.0-preview.5.25272.110 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]

@dotnet-actwx-bot @dotnet/compat

Metadata

Metadata

Assignees

No one assigned

    Labels

    Needs: Attention 👋This issue needs the attention of a contributor, typically because the OP has provided an update.area-ui-renderingIncludes: MVC Views/Pages, Razor Views/Pages

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions