UWP App Compilation Error PRI175 with 0xdef00071

≡放荡痞女 提交于 2019-12-24 08:10:13

问题


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.


回答1:


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.

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.



来源:https://stackoverflow.com/questions/55189683/uwp-app-compilation-error-pri175-with-0xdef00071

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!