Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xamarin.Forms.UWP - error PRI175

Tags:

c#

xamarin

uwp

I've got 3 Projects inside my Solution.

  • Project A (Xamarin.Windows.UWP - This is the exectuable Project) (References Project B + C)
  • Project B (Xamarin.Forms - This is a class Library)
  • Project C (Xamarin.Forms.UWP - Acts as a Renderer Library) ( References Project B)

The Problem here is, that if Project A references both B + C, I get 2 errors when building:

  • Error PRI175 - duplicate Entry
  • GENERATEPROJECTPRIFILE - 0xdef00532 - Conflicting values for resource "

Unfortunatly this is everything I get. Removing reference Project C or B from Project A lets me build without any problems, but I need classes from both Project B + C in Project A.

So, does anyone knows whats causing these Build errors here?

Thanks a lot for your help!

Edit:

I recreated the structure and the same error appears. The solution can be found here. Open TestSolutionC, Build TestSolutionC.UWP

like image 646
DirtyNative Avatar asked Feb 19 '18 10:02

DirtyNative


2 Answers

Try this - In your main app project file, under top-most <PropertyGroup>, add:

<DisableEmbeddedXbf>false</DisableEmbeddedXbf>

Related discussion - Developer Community thread

like image 76
zax Avatar answered Oct 24 '22 12:10

zax


This happens due to many reasons. Please check the solutions mentioned below.

SOLUTION 1: When you are adding a third party render library (Project C), check that you have the same version of Xamarin.Forms used throughout the solution projects. Conflicts may occur if multiple versions of Xamarin.Forms have been used.

Use the same Xamarin.Forms version or update the entire solution's Xamarin.Forms version to a latest stable version from the NuGet Manager

SOLUTION 2: Make sure that your project files within the solution do not contain unwanted references. If found, resolve duplicate references, Clean and Rebuild the project.

See also https://stackoverflow.com/a/45217513/4353760

like image 43
Kusal Dissanayake Avatar answered Oct 24 '22 13:10

Kusal Dissanayake