Search code examples
windows-store-appsvisual-studio-2013

Windows 8.1 Store app MAKEPRI build error


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

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?


Solution

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

    Then I realized this

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

    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."

    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!

    Thanks Tim and the devs team!