Error finding merged resource dictionary in another assembly

前端 未结 2 839
情书的邮戳
情书的邮戳 2021-01-03 06:13

I\'m really beating my head against the wall here. First, some background. The app is a PRISM 4/MVVM app using WPF and my solution is structured as follows:

         


        
相关标签:
2条回答
  • 2021-01-03 07:00

    I ran into the same thing with a different twist. One project's pack uri worked fine, while the same uri used in another project in the same solution failed. Nice!

    The way I got it to work was to add the resource in question to the root of the failure project as a linked file from the target assembly specified in the pack uri. Once the linked file was added to the project, the pack issue magically dissappeared.

    Steps (VS2012) 1. Right Click on the project and select "Add". Then Select "add existing". 2. Browse for the resource file in the other project. 3. Highlight the xaml file. Then select the arrow drop by the "add" button. The drop down presents "add as link", select that and add it to the file.

    That way any changes done to this linked file makes its way to all projects and fixes this bizarre issue with pack.

    0 讨论(0)
  • 2021-01-03 07:05

    Make sure the referenced assembly was compiled for targeting the same version of .Net framework.

    0 讨论(0)
提交回复
热议问题