UWP App Compilation Error PRI175 with 0xdef00071

1

We have a UWP app which is referring some UWP class libraries and some Portable Class Library (PCL) libraries.

Recently we have converted some of these PCL libraries to .NET Standard 2.0 project and post to that, we are getting the below error on compiling the UWP app.

error PRI175 : 0x80070002 - Processing Resources failed with error : The system cannot find the file specified.
GENERATEPROJECTPRIFILE : error PRI252: 0xdef00071 - File <UWP Class Library Project Folder>\bin\x64\Debug\<UWP Class Library Project Name>.pri not found.       

An additional thing is, there are 13 UWP class libraries in total referred (3 directly or 10 indirectly) by this UWP app project, and all these are giving the below build error on the build of solution (by setting UWP app project as the startup project) or build of the UWP app project itself:

CA0055 : Could not identify platform for '<Corresponding UWP class library project folder>\bin\x64\Debug\<UWP class library name>.dll'.
CA0052 : No targets were selected.

But, these CA0052 and CA0055 errors goes off for all these projects, if all those are built independently afterwards. It looks like an issue only on the clean build and not on an incremental build. Not sure but, this maybe having something to do with this main error of the UWP app build.

Note: There is a point that for the PCL library converted to .NET Standard is having some resource files (.resx files) included in it. Similarly the UWP class library whose name appears in this error message have some other resource files (.resx files) included in it as well.

I read another question on the similar ground at Issue building UWP app using MSBuild (GENERATEPROJECTPRIFILE). But, the issue there is majorly related to Cake build. Issue here is happening with Visual Studio build itself. Solution posted in this post is not solving my issue.

c#
uwp
visual-studio-2017
portable-class-library
.net-standard-2.0
asked on Stack Overflow Mar 15, 2019 by RinoTom • edited Mar 20, 2019 by RinoTom

1 Answer

0

CA0052 and CA0055 was causing the PRI related error here. And those CA errors were because of the way of running code analysis by enabling it in project properties tab of 'Code Analysis' as depicted below.

enter image description here

It is not supported if you are running your UWP class libraries targeting the Fall Creators update version of UWP SDK (16299), which is a prerequisite for referring .NET Standard 2.0 projects in UWP class libraries or app projects.

Instead I could get code analysis running in these projects by adding a Nuget package reference to Microsoft.CodeAnalysis.FxCopanalyzers in these UWP class libraries.

answered on Stack Overflow Apr 1, 2019 by RinoTom

User contributions licensed under CC BY-SA 3.0