locked
Failing to build some (WinRT) DirectX samples with VS2012

    Question

  • I downloaded the Windows 8 samples from MSDN:
    http://code.msdn.microsoft.com/Windows-8-Modern-Style-App-Samples

    I was thinking to give a go at learning WinRT/C++/DirectX all together and have a go at compiling / modifying some sample for that.

    I gave a go at: "Direct3D resource loading", "DirectX postcard sample", "XAML DirectX  3D shooting game sample"

    They all fail to compile with 1 error:
    ==
    1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.CppBuild.targets(472,9): error MSB4186: Invalid static method invocation syntax: "[MSBuild]::MakeRelative($(TargetDir), C:\Dev\Samples\Windows 8 app samples - C#, VB.NET, C++, JavaScript\XAML DirectX  3D shooting game sample\C++\Debug\Simple3DGameXaml\PixelShader.cso)". Method '[MSBuild]::MakeRelative' not found. Static method invocation should be of the form: $([FullTypeName]::Method()), e.g. $([System.IO.Path]::Combine(`a`, `b`)).
    ==

    Apparently there is an MSBuild build problem with some pixel shader.

    Not sure what to do (remember I'm a DirectX newbie and rusty with C++)

    How could I fix this build problem please?

    Sunday, September 09, 2012 2:12 PM

Answers

  • OK, I found it!
    Someone had the same problem:
    http://code.msdn.microsoft.com/windowsapps/XAML-SurfaceImageSource-58f7e4d5/view/Discussions

    Just moved the sample to a folder with a shorter full name (path to root)
    And it compiled!!

    • Marked as answer by Lloyd Sunday, September 09, 2012 2:34 PM
    Sunday, September 09, 2012 2:34 PM

All replies

  • OK, I found it!
    Someone had the same problem:
    http://code.msdn.microsoft.com/windowsapps/XAML-SurfaceImageSource-58f7e4d5/view/Discussions

    Just moved the sample to a folder with a shorter full name (path to root)
    And it compiled!!

    • Marked as answer by Lloyd Sunday, September 09, 2012 2:34 PM
    Sunday, September 09, 2012 2:34 PM
  • Thanks for sharing the solution.

     

    Best regards,

    Jesse



    Jesse Jiang [MSFT]
    MSDN Community Support | Feedback to us

    Monday, September 10, 2012 7:11 AM
    Moderator