Windows 8.1 应用商店应用 MAKEPRI 构建错误 [英] Windows 8.1 Store app MAKEPRI build error

查看:39
本文介绍了Windows 8.1 应用商店应用 MAKEPRI 构建错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在使用 Visual Studio 2013 构建任何新创建的项目或旧的 Windows 应用商店项目时,我不断收到以下两个错误

I keep getting the following two errors while building any newly created project, or old for Windows Store projects with Visual Studio 2013

Error   1   Initializing Indexer    c:\Temp\App4\App4\MakePri   App4
Error   2   Schema Validation Failed. The attribute 'targetOsVersion' on the element 'resources' is not defined in the DTD/Schema.  c:\Temp\App4\App4\MakePRI   App4

将 MSBuild 项目构建输出详细程度改为诊断我看到以下内容

Turning the MSBuild project build output verbosity to Diagnostic I see the following

2>Using "GenerateProjectPriFile" task from assembly "C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v12.0\AppxPackage\Microsoft.Build.AppxPackage.dll".
2>Task "GenerateProjectPriFile" (TaskId:159)
2>  Task Parameter:MakePriExeFullPath=C:\Program Files (x86)\Windows Kits\8.0\bin\x64\MakePri.exe (TaskId:159)
2>  Task Parameter:PriConfigXmlPath=obj\Debug\priconfig.xml (TaskId:159)
2>  Task Parameter:
2>      IndexFilesForQualifiersCollection=
2>          obj\Debug\layout.resfiles
2>          obj\Debug\resources.resfiles (TaskId:159)
2>  Task Parameter:ProjectPriIndexName=b3cbc7ac-25e8-4dda-a091-231a51997222 (TaskId:159)
2>  Task Parameter:InsertReverseMap=False (TaskId:159)
2>  Task Parameter:ProjectDirectory=C:\@Personal\Projects\Squeezy2\Squeezy\Squeezy\ (TaskId:159)
2>  Task Parameter:OutputFileName=C:\@Personal\Projects\Squeezy2\Squeezy\Squeezy\bin\Debug\resources.pri (TaskId:159)
2>  Task Parameter:QualifiersPath=obj\Debug\qualifiers.txt (TaskId:159)
2>  Task Parameter:IntermediateExtension=.intermediate (TaskId:159)
2>  Task Parameter:MultipleQualifiersPerDimensionFoundPath=obj\Debug\MultipleQualifiersPerDimensionFound.txt (TaskId:159)
2>  C:\Program Files (x86)\Windows Kits\8.0\bin\x64\MakePri.exe New -ProjectRoot "C:\@Personal\Projects\Squeezy2\Squeezy\Squeezy\\" -ConfigXml obj\Debug\priconfig.xml -OutputFile "C:\@Personal\Projects\Squeezy2\Squeezy\Squeezy\bin\Debug\resources.pri" -IndexName b3cbc7ac-25e8-4dda-a091-231a51997222 -Verbose -Overwrite   (TaskId:159)
2>  Option Verbose specified (TaskId:159)
2>  Option Overwrite specified (TaskId:159)
2>MakePri : error 0x80004005: Initializing Indexer
2>MakePRI : error 0xdef00501: Schema Validation Failed. The attribute 'targetOsVersion' on the element 'resources' is not defined in the DTD/Schema.

知道如何解决这个问题吗?

Any idea how to fix that?

推荐答案

我必须将 VS2013 Tools > Options > Projects and Solutions > Build and Run > MSBuild project build output verbosity 设置为 Diagnostic

I had to set VS2013 Tools > Options > Projects and Solutions > Build and Run > MSBuild project build output verbosity to Diagnostic

然后我意识到这一点

1> 任务参数:MakePriExeFullPath=C:\Program Files (x86)\Windows Kits\8.0\bin\x64\MakePri.exe (TaskId:86)

1> Task Parameter:MakePriExeFullPath=C:\Program Files (x86)\Windows Kits\8.0\bin\x64\MakePri.exe (TaskId:86)

所以它使用了错误版本的 SDK.然后和蒂姆·豪雅 (Tim Heuer) 交谈,他告诉我开发人员告诉我,这是因为 SDK 路径混乱,如果您从 VS2012 命令提示符打开 VS,可能会导致此问题."

So it was using the wrong version of the SDK. Then talking to Tim Heuer he told me that "The devs are telling me that this is because the SDK path is messed up and can be caused if you are opening VS from a VS2012 command prompt perhaps."

那是因为我从 powershell 启动了 VS2013,这是我的 powershell 配置文件中的 Visual Studio 2012 命令提示符变量的设置.当我将其更改为 Vs2013 时,一切又开始正常工作了!

That was it because I started VS2013 from powershell which was settings in my powershell profile the Visual Studio 2012 command prompt variables. When I changed it to Vs2013 everythign started to work correctly again!

感谢 Tim 和开发团队!

Thanks Tim and the devs team!

这篇关于Windows 8.1 应用商店应用 MAKEPRI 构建错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆