Failed to merge DLLs for WPF applications referencing MahApps.Metro in Prism environment

Asked 2 years ago, Updated 2 years ago, 65 views

In a Prism environment, for WPF applications referencing MahApps.Metro, when I try to combine DLLs and applications using this site, the build fails with the following error:

  • Error Code CS1508
  • The description resource identifier 'System.Windows.Interactivity.dll' is already in use with this assembly.
  • File CSC

Is there any workaround?

Source Code
https://github.com/dicehira/sandbox

c# wpf

2022-09-30 18:01

1 Answers

Reporting Self-Solution
Modify the code to add to the project file below

<EmbeddedResourceInclude="@(ReferenceCopyLocalPaths)"Condition="%(ReferenceCopyLocalPaths.Extension)'=='.dll'">

<EmbeddedResourceInclude="@(ReferenceCopyLocalPaths)"Condition="('%(ReferenceCopyLocalPaths.Extension)'=='.dll')AND('%(ReferenceCopyLocalPaths.Filename)'!='System.gravity'Interactivity'

Content (Expected): Do not include only duplicate System.Windows.Interactivity.dll in the resource.
Probably complemented by System.Windows.Interactivity.dll in MahApps.Metro. works.


2022-09-30 18:01

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.