locked
Compilation error in the "XAML SurfaceImageSource" example

    Question

  • I downloaded the Microsoft DirectX Interop sameple for SurfaceImageSource and it doesn't seem to compile. It is producing errors when compiling the shader portion of the Scenario2Component project.  The error is rather non-descript.

    Error 1 error MSB4186: Invalid static method invocation syntax: "[MSBuild]::MakeRelative($(TargetDir), C:\shares\Samples\XAML SurfaceImageSource DirectX interop sample\C#,C++\Debug\Scenario2Component\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 472 9 Scenario2Component

    Notice that the line at which the error is reported it not part of the source code for the project itself, but one of Visual Studio's files. I found another report of the same error on the web and it suggested repairing the Visual Studio installation. I've tried this along with doing a new installation on another computer and it's had no impact on the error itself. If I remove the pixel shader the project will compile. Of course it won't run because the pixel shader is then missing. 

    Any idea what's going on here?


    Joel Ivory Johnson | http://www.j2i.net | Windows Phone Developer MVP
    It takes all the running you can do to stay in one place.If you want to get somewhere else,you must try to run at least twice as fast as that.

    Saturday, December 22, 2012 3:21 PM

Answers

  • Nevermind. Problem solved. The problem is because of a comma in the path ("C#,C++") and the build processes not taking well to it. Changing the comma to something else fixes the problem. 

    Joel Ivory Johnson | http://www.j2i.net | Windows Phone Developer MVP
    It takes all the running you can do to stay in one place.If you want to get somewhere else,you must try to run at least twice as fast as that.

    Saturday, December 22, 2012 3:35 PM

All replies

  • Nevermind. Problem solved. The problem is because of a comma in the path ("C#,C++") and the build processes not taking well to it. Changing the comma to something else fixes the problem. 

    Joel Ivory Johnson | http://www.j2i.net | Windows Phone Developer MVP
    It takes all the running you can do to stay in one place.If you want to get somewhere else,you must try to run at least twice as fast as that.

    Saturday, December 22, 2012 3:35 PM
  • Thanks for sharing.

    Best regards,
    Jesse


    Jesse Jiang
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Monday, December 24, 2012 6:55 AM