Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conflicting assets with the same target path '_framework/blazor.modules.json' when building 2nd dependency MAUI Blazor class libraries #25999

Open
datvm opened this issue Nov 20, 2024 · 3 comments
Labels
area-blazor Blazor Hybrid / Desktop, BlazorWebView i/regression This issue described a confirmed regression on a currently supported version platform/android 🤖 platform/iOS 🍎 platform/macOS 🍏 macOS / Mac Catalyst platform/windows 🪟 s/triaged Issue has been reviewed s/verified Verified / Reproducible Issue ready for Engineering Triage t/bug Something isn't working

Comments

@datvm
Copy link

datvm commented Nov 20, 2024

Description

When building a MAUI Blazor class library project (Microsoft.NET.Sdk.Razor) like this, I receive this error:

MultipleMauiLibs.Lib1 depends on public Nuget package BlazorMaterialWeb.Bundled.
MultipleMauiLibs.Lib2 depends on MultipleMauiLibs.Lib1.

  • Building MultipleMauiLibs.Lib1 only is fine.
  • Without refering to BlazorMaterialWeb.Bundled, both MultipleMauiLibs.Lib1 and MultipleMauiLibs.Lib2 are fine.
  • When refering to BlazorMaterialWeb.Bundled and building MultipleMauiLibs.Lib2, the below error happens.

I suspect it has something to do with #15234. I am sure my project could build before, probably with .NET 8.0.402. I tried uninstall my .NET SDK and reinstall it but with the workload installed the latest, I can't find out the version this issue begins (I do not know how to install a previous workload version).

Full error message:

Conflicting assets with the same target path '_framework/blazor.modules.json'. For assets 'Identity: C:\Users\lukev\source\repos\MultipleMauiLibs\MultipleMauiLibs.Lib1\obj\Debug\net8.0-android\jsmodules\jsmodules.build.manifest.json, SourceType: Project, SourceId: MultipleMauiLibs.Lib1, ContentRoot: C:\Users\lukev\source\repos\MultipleMauiLibs\MultipleMauiLibs.Lib1\obj\Debug\net8.0-android\jsmodules, BasePath: /, RelativePath: _framework/blazor.modules.json, AssetKind: Build, AssetMode: CurrentProject, AssetRole: Primary, AssetRole: , AssetRole: , RelatedAsset: , AssetTraitName: JSModule, AssetTraitValue: JSModuleManifest, Fingerprint: rwgk8v7aty, Integrity: m2YidR3qJEUQ6rEG2+yPsHcAXxc8hJ+UFYOLFiDAhVc=, CopyToOutputDirectory: Never, CopyToPublishDirectory: PreserveNewest, OriginalItemSpec: C:\Users\lukev\source\repos\MultipleMauiLibs\MultipleMauiLibs.Lib1\obj\Debug\net8.0-android\jsmodules\jsmodules.build.manifest.json' and 'Identity: C:\Users\lukev\source\repos\MultipleMauiLibs\MultipleMauiLibs.Lib2\obj\Debug\net8.0-android\jsmodules\jsmodules.build.manifest.json, SourceType: Computed, SourceId: MultipleMauiLibs.Lib2, ContentRoot: C:\Users\lukev\source\repos\MultipleMauiLibs\MultipleMauiLibs.Lib2\obj\Debug\net8.0-android\jsmodules, BasePath: /, RelativePath: _framework/blazor.modules.json, AssetKind: Build, AssetMode: CurrentProject, AssetRole: Primary, AssetRole: , AssetRole: , RelatedAsset: , AssetTraitName: JSModule, AssetTraitValue: JSModuleManifest, Fingerprint: rwgk8v7aty, Integrity: m2YidR3qJEUQ6rEG2+yPsHcAXxc8hJ+UFYOLFiDAhVc=, CopyToOutputDirectory: Never, CopyToPublishDirectory: PreserveNewest, OriginalItemSpec: obj\Debug\net8.0-android\jsmodules\jsmodules.build.manifest.json' from different projects.

Steps to Reproduce

No response

Link to public reproduction project repository

https://github.com/datvm/MultipleMauiBlazorLib

Version with bug

9.0.10 SR1

Is this a regression from previous behavior?

Yes, this used to work in .NET MAUI

Last version that worked well

Unknown/Other

Affected platforms

Android, Windows, macOS, iOS

Affected platform versions

No response

Did you find any workaround?

No response

Relevant log output

@datvm datvm added the t/bug Something isn't working label Nov 20, 2024
@samhouts samhouts added platform/macOS 🍏 macOS / Mac Catalyst platform/windows 🪟 platform/android 🤖 platform/iOS 🍎 potential-regression This issue described a possible regression on a currently supported version., verification pending labels Nov 20, 2024
@Zhanglirong-Winnie Zhanglirong-Winnie added s/verified Verified / Reproducible Issue ready for Engineering Triage s/triaged Issue has been reviewed i/regression This issue described a confirmed regression on a currently supported version and removed potential-regression This issue described a possible regression on a currently supported version., verification pending labels Nov 21, 2024
@Zhanglirong-Winnie
Copy link

This issue has been verified using Visual Studio 17.13 Preview 1(9.0.10 & 8.0.100 & 8.0.83). Can repro this issue on all platforms. And 8.0.82 works fine.

@datvm
Copy link
Author

datvm commented Nov 21, 2024

@Zhanglirong-Winnie hi, I really need to build my project. Could you tell me how I can install that version please?

@PureWeen PureWeen added the area-blazor Blazor Hybrid / Desktop, BlazorWebView label Nov 21, 2024
@Zhanglirong-Winnie
Copy link

Hi, @datvm
You can change the MAUI controls version to 8.0.82, or lower.
Image
Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-blazor Blazor Hybrid / Desktop, BlazorWebView i/regression This issue described a confirmed regression on a currently supported version platform/android 🤖 platform/iOS 🍎 platform/macOS 🍏 macOS / Mac Catalyst platform/windows 🪟 s/triaged Issue has been reviewed s/verified Verified / Reproducible Issue ready for Engineering Triage t/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants