UWP : PRI277: 0xdef00532 - Conflicting values for resource ''
Asked Answered
H

3

8

As a part of the Visual Studio 2017 UWP build process, an app called MakePri.exe is run. It is throwing an error in my project but I have no idea why. The command line call is:

C:\Program Files (x86)\Windows Kits\10\bin\10.0.16299.0\x64\MakePri.exe New -ProjectRoot C:\AdaptSource\src\Xivic\Adapt.Presentation.XamarinForms\Adapt.Presentation.Xivic.UWP\ -ConfigXml obj\x86\Debug\priconfig.xml -OutputFile C:\AdaptSource\src\Xivic\Adapt.Presentation.XamarinForms\Adapt.Presentation.Xivic.UWP\bin\x86\Debug\resources.pri -IndexName AdaptSolutionsPty.Ltd.Xivic-Helpdesk -Verbose -Overwrite

The error that it returns is:

error PRI175 : 0x80073b0f - Processing Resources failed with error : Duplicate Entry.

GENERATEPROJECTPRIFILE : error PRI277: 0xdef00532 - Conflicting values for resource ''

I have no idea what it is talking about. There is no useful information in the error message. After sifting through a lot of google results, I see that the problem seems to come up when there are references to certain or duplicate DLLs in referenced .NET Standard / PCL projects.

For example: https://forums.xamarin.com/discussion/103956/strange-build-error-xamarin-uwp

UWP unit test compile errors

But in other threads, at least people are getting a resource name to work with. I've removed as many references as I can. I've used resharper to help. I really need to get a useful error message out of MakePri. Does anyone know anything about this? Is there a way to see what it is stumbling on?

Edit: The issue was that my solution was using two versions of Xamarin.Forms. Once I consolidated the NuGet packages, the problem went away. But, I feel like this is a bug because the error message should be more descriptive. It wastes a lot of time. So, I've logged the issue here: https://github.com/dotnet/buildtools/issues/1912 I'll leave this open until there is some kind of response at Microsoft.

Heligoland answered 13/2, 2018 at 23:22 Comment(1)
Sure I had the same issue, I did everything ... one entire day :'( Finally I found the same problem, I had to consolidate Microsoft.NETCore.UniversalWindowsPlatformDart
P
8

Consolidate both Xamarin.Forms and Microsoft.NETCore.UniversalWindowsPlatform version for all the dependency projects will resolve the issue. It is mainly due to the Xamarin.Forms latest stable version requires higher version of Microsoft.NETCore.UnivesalWindowsPlatform nuget i.e.,(6.0.1).

Pacer answered 22/10, 2018 at 10:18 Comment(0)
A
0

The message is missing a piece, may caused by 16299 sdk

please try use 15063 and you may get the right key

Arturoartus answered 9/4, 2018 at 8:7 Comment(0)
Z
0

I had the same problem, with the exact same error message. My fix was different than yours.

By deleting resources one at a time, until the build succeeded, i found the cause to be in one of my language .resw files I had forgotten to append .Text to the name.

Language A: "Message.Text", "Hello world"

Language B: "Message", "Hello world"

This oversight gave me the error you mention in the heading. The fix for me was to append .Text so the names are identical.

Zap answered 13/1, 2022 at 16:37 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.