locked
build error of Direct3DTutorial

    Question

  • Hi,

    It seems there is an build error (Lesson 2 or 3) when I download the Direct3DTutorial on D drive.

    Error 1 error MSB4186: Invalid static method invocation syntax: "[MSBuild]::MakeRelative($(TargetDir), D:\BA\Windows 8 Release Preview Metro style app samples - C#, VB.NET, C++, JavaScript\Direct3D tutorial sample\C++\Debug\Lesson2.Triangles\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 464 10 Lesson2.Triangles

    If I move the sample to C drive, build is fine. Is it a bug?

    Also I am looking for step by step tutorial to teach me how to programming using DirectX to draw shapes like line, circle and so on. Any good website?


    rob qqq

    Monday, July 23, 2012 10:28 PM

Answers

  • The extremely long path has caused me issues as well in the past. Simply building these projects from my d: drive did not create the errors mentioned. If not a path length issue, possibly a corrupt file (accidentally edited?).


    David Lamb

    • Marked as answer by rob qqq Thursday, July 26, 2012 5:12 PM
    Thursday, July 26, 2012 12:45 AM
    Moderator
  • The problem is in the "C++,C#" folder, characters like that in the folder name messes something up. Rename to "Project" and recompile. Kinda dumb since those are the folders the archive contains. This whole Windows Store apps is so beta...


    • Edited by dieinus Thursday, November 08, 2012 3:15 PM
    • Marked as answer by rob qqq Thursday, November 08, 2012 5:32 PM
    Thursday, November 08, 2012 3:14 PM

All replies

  • Hi rob,

    I have downloaded Direct3D tutorial sample from this link by clicking the "C++ (211.6KB)" button: http://code.msdn.microsoft.com/windowsapps/Direct3D-Tutorial-Sample-08667fb0/view/Discussions. The OS on my side is Windows 8 Release Preview, and I have installed Visual Studio 2010 RC Ultimate version. All the five projects under Direct3DTutorial solution can compile and run successfully.

    I hope this reply is helpful to you.
    Best regards,


    Helen Zhao [MSFT]
    MSDN Community Support | Feedback to us

    Tuesday, July 24, 2012 9:17 AM
  • make sure you download to D drive

    rob qqq

    Tuesday, July 24, 2012 1:37 PM
  • This might be linked to the length of the path rather than the drive letter.

    Try to make your folder name shorter (for example rename your folder "Windows 8 Release Preview Metro style app samples - C#, VB.NET, C++, JavaScript" to "Win8 Samples")

    MSBuild seems to have some problems using long path names (> 128).

    When I use long path names, I often get error messages. Not the exact same error message you have, but something similar, such as:

    error  : The item metadata "%(FullPath)" cannot be applied to the path

    Thursday, July 26, 2012 12:37 AM
  • The extremely long path has caused me issues as well in the past. Simply building these projects from my d: drive did not create the errors mentioned. If not a path length issue, possibly a corrupt file (accidentally edited?).


    David Lamb

    • Marked as answer by rob qqq Thursday, July 26, 2012 5:12 PM
    Thursday, July 26, 2012 12:45 AM
    Moderator
  • Can't believe long path issue still happens in Windows 8 - 64 bit OS.  MS should fix this issue.

    rob qqq

    Thursday, July 26, 2012 5:12 PM
  • The problem is in the "C++,C#" folder, characters like that in the folder name messes something up. Rename to "Project" and recompile. Kinda dumb since those are the folders the archive contains. This whole Windows Store apps is so beta...


    • Edited by dieinus Thursday, November 08, 2012 3:15 PM
    • Marked as answer by rob qqq Thursday, November 08, 2012 5:32 PM
    Thursday, November 08, 2012 3:14 PM