Con risposta Compilation Error MSB4186 in C++ Samples

  • sabato 17 marzo 2012 10:11
     
     

    I am trying to get the Directx samples to build. Lesson 1 runs without issues, but as soon as there is a shader file in the Project i get the following Error:

    ----

    error MSB4186: Invalid static method invocation syntax: "[MSBuild]::MakeRelative($(OutDir), C:\Users\Reto\Downloads\Windows 8 Consumer Preview Metro style app samples - C#, VB.NET, C++, JavaScript\Metro style 3-D maze game sample\C++\Debug\MarbleMaze\SimplePixelShader.cso)". Method '[MSBuild]::MakeRelative' not found. Static method invocation should be of the form: $([FullTypeName]::Method()), e.g. $([System.IO.Path]::Combine(`a`, `b`)).  C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.CppBuild.targets 470 10 MarbleMaze

    ---

    I have two machines set up with Consumer preview, and the sample code is for Consumer Preview. Did anybody here have this error and was able to fix it?

Tutte le risposte

  • lunedì 19 marzo 2012 07:32
    Moderatore
     
     

    Hello,

    I tested Metro style 3-D maze game sample, but cannot reproduce this issue.
    What's your screen resolution of your system. Make sure that it must be larger than 800*600.

    Best regards,
    Jesse


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

  • martedì 3 aprile 2012 09:29
     
     

    I have two machines with the same issue, one has been upgraded from Developer Preview (where the samples were working).

    The machines have a display resolution of 1024x768 (Toshiba Laptop) and 1440x900 (Core2Duo Macbook Pro with ATI X1600). The thing is, it's the Shader Compiler that somehow has a problem. If i remove the hlsl files from the project the compilation works. Also i can init DirectX and clear the screen. You should probably forward this to someone who is more into the whole build process. What they do have in common: I upgraded both machines from Developer Preview to Consumer Preview.

  • mercoledì 4 aprile 2012 06:17
    Moderatore
     
     
    Thanks for your feedback, I will involve more experts to investigate it.
     
    Best regards,
    Jesse

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

  • mercoledì 11 aprile 2012 23:32
     
     Con risposta

    Hello Reto Senn, this might be a parsing error, but could unpackage the "Metro style 3-D maze game" to a different directory.  I feel that the parser could not handle "Windows 8 Consumer Preview Metro style app samples - C#, VB.NET, C++, JavaScript" correctly.

    Thanks

    Felix

  • venerdì 13 aprile 2012 15:52
     
     

    Renaming the folder fixed this problem for me.  Everything seems to be building ok now.

    Thanks Mucho,

    FL

  • mercoledì 18 aprile 2012 23:43
     
     
    I had this issue on a Virtual Box instance of Windows 8 CP 8250 and the fix was to re-unzip the samples to a new shorter folder....

    Make the web a beautiful place