Search

MakePri.exe error -1073740940 in Windows Runtime Component project with Mesh Content by BrettWillis

Closed

2
0
Sign in
to vote
Type: Bug
ID: 775836
Opened: 1/4/2013 1:50:18 PM
Access Restriction: Public
1
Workaround(s)
1
User(s) can reproduce this bug
A Windows Runtime Component project fails to compile if an FBX graphics file compiled with “Mesh Content Pipeline” is added to the project. The failure is caused by MakePri.exe as follows.

This error appears to only happen in the Windows Runtime Component project, because the same thing works fine in the “Direct3D App” project template provided with Visual Studio.

Following is the output from the build:

1>------ Rebuild All started: Project: WindowsRuntimeComponent1, Configuration: Debug Win32 ------
1> arrow.fbx
1> pch.cpp
1> Class1.cpp
1>     Creating library C:\Users\Brett\Desktop\Visual Studio 3D Starter Kit\C++\Debug\WindowsRuntimeComponent1\WindowsRuntimeComponent1.lib and object C:\Users\Brett\Desktop\Visual Studio 3D Starter Kit\C++\Debug\WindowsRuntimeComponent1\WindowsRuntimeComponent1.exp
1> WindowsRuntimeComponent1.vcxproj -> C:\Users\Brett\Desktop\Visual Studio 3D Starter Kit\C++\Debug\WindowsRuntimeComponent1\WindowsRuntimeComponent1.dll
1>C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\AppxPackage\Microsoft.AppXPackage.Targets(520,9): error MSB6006: "MakePri.exe" exited with code -1073740940.
========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========


This can be worked around by doing the following:
1) Add the FBX file
2) Compiling (this fails with the above error)
3) Get the output from the MeshContentTask (the .cmo and .cso file) and copy them to the project folder and add as a resource (under the file’s properties set “Content” to “Yes”)
4) Delete the original FBX file

By doing this the compiled FBX file is added as a resource and the project builds successfully.
Details (expand)

Visual Studio/Team Foundation Server/.NET Framework Tooling Version

Visual Studio 2012

Steps to reproduce

1) Create new C++ Windows Runtime Component project for Windows Store Apps
2) Add the MeshContentTask to the project’s build customisations
    a) Right-click project > Build Customisations > Find Existing
    b) Add C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\Extensions\Microsoft\VsGraphics\MeshContentTask.targets
3) Add an FBX 3D graphics model to the project (e.g. arrow.fbx)
4) Set the file to compile with Mesh Content Pipeline
    a) Right-click .fbx file > Properties > Configuration Properties > General
    b) Set “Item Type” to “Mesh Content Pipeline”
    c) “Content” setting has no effect on the outcome
5) Building the project fails with MakePri.exe error code -1073740940
6) Remove the .fbx file from the project and the build succeeds

Product Language

English

Operating System

Windows 8

Operating System Language

English

Actual results

Build with a file compiled with Mesh Content Pipeline in the project fails with the following output. In this case the file in question is “arrow.fbx”.

1>------ Rebuild All started: Project: WindowsRuntimeComponent1, Configuration: Debug Win32 ------
1> arrow.fbx
1> pch.cpp
1> Class1.cpp
1>     Creating library C:\Users\Brett\Desktop\Visual Studio 3D Starter Kit\C++\Debug\WindowsRuntimeComponent1\WindowsRuntimeComponent1.lib and object C:\Users\Brett\Desktop\Visual Studio 3D Starter Kit\C++\Debug\WindowsRuntimeComponent1\WindowsRuntimeComponent1.exp
1> WindowsRuntimeComponent1.vcxproj -> C:\Users\Brett\Desktop\Visual Studio 3D Starter Kit\C++\Debug\WindowsRuntimeComponent1\WindowsRuntimeComponent1.dll
1>C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\AppxPackage\Microsoft.AppXPackage.Targets(520,9): error MSB6006: "MakePri.exe" exited with code -1073740940.
========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========

Expected results

Build should succeed with the output of the Mesh Content Pipeline available as resources.

In this case the said output files are:
_Program Files (x86)_Microsoft Visual Studio 11.0_Common7_IDE_Extensions_Microsoft_VsGraphics_Assets_Effects_Phong.dgsl.cso
arrow.cmo
File Attachments
0 attachments
Sign in to post a comment.
Posted by BrettWillis on 2/1/2013 at 6:30 PM
I have updated to Visual Studio Update 2 CTP 2, and the project now builds successfully. However the texture and shader files which are by-products of the Mesh Content Pipeline build task are NOT copied to the app’s resources directory. Only the mesh “.cmo” file itself is copied. I have created another bug report for this issue (https://connect.microsoft.com/VisualStudio/feedback/details/778337/by-products-of-mesh-content-pipeline-aren-t-copied-into-appx-resources). Thanks for your help.
Posted by Microsoft on 1/30/2013 at 1:15 PM
Thanks for your feedback. This bug fix has been released as a preview on Visual Studio Update 2 CTP 2 (http://support.microsoft.com/kb/2797912).
Posted by BrettWillis on 1/30/2013 at 12:00 AM
Can you provide any indication of when the next release of VS Update might be released? Could it be in the order of weeks? Or months? Thanks for your help.
Posted by Microsoft on 1/21/2013 at 12:21 PM
Thank you for your feedback. This is a bug we'll be fixing via the next release of VS Update.
Posted by Microsoft on 1/6/2013 at 9:21 PM
Thanks for your feedback.

We are rerouting this issue to the appropriate group within the Visual Studio Product Team for triage and resolution. These specialized experts will follow-up with your issue.
Posted by Microsoft on 1/4/2013 at 2:50 PM
Thank you for your feedback, we are currently reviewing the issue you have submitted. If this issue is urgent, please contact support directly(http://support.microsoft.com)
Sign in to post a workaround.
Posted by BrettWillis on 1/21/2013 at 12:34 PM
This can be worked around by doing the following:
1) Add the FBX file
2) Compiling (this fails with the above error)
3) Find the output files from the MeshContentTask (for exmaple, the .cmo and .cso file(s)) and copy them to the project folder and add as a resource (under the file’s properties set “Content” to “Yes”)
4) Delete the original FBX file

By doing this the compiled FBX file is added as a resource and the project builds successfully.