locked
Could not make a release build of a windows store game.

    Question

  • Hi all,

    Finally I finnished developing a 3D C++ and directx game to Wondows 8.1 store. I'm having problems runing a release build of my game, by getting this error:

    error X4502: invalid vs_2_0 output semantic 'SV_Target'

     

    Compiling the game in debug mode has no errors, it works ok. but in release mode not. I am using Visual studio 2015 preview, with platform toolset of Visual studio 2013 (V120), because v14 is not installed.


    Admir

    Monday, March 16, 2015 6:55 PM

Answers

  •      Hi Admir,

         I believe that the problem is that your shader's settings in "Release" are different than "Debug" configuration. That happened to me.

     * Change your proyect to "Release" if you haven't done so,
     * Righ-click on your shaders and go to properties,
     * On the new window, click on "HLSL Compiler"
     * Make sure the shader type is set ("vertex", "pixel", etc). This field is usually the guilty one.
     * Make sure you are also using the right level (the default is 9_1)

         I had to do this checking in "Release" for every shader I added in Debug.

         Note that I'm not integrating to XML either. I'm just creating games using plain and simple DirectX,

         I hope it helps!!!

         Tarh Ik

    PS: This posting has been posted "AS IS"


    Tarh ik


    • Edited by Tarh ik Friday, March 20, 2015 12:35 PM
    • Marked as answer by admiri92 Friday, March 20, 2015 5:48 PM
    Friday, March 20, 2015 12:33 PM

All replies

  • Hi Admir,

    Let's see if a similar discussion can help you: https://social.msdn.microsoft.com/Forums/windowsapps/en-US/6ddba6fa-5f2d-4fc5-8d5d-1610040bec7f/hlsl-compiler-problem?forum=wingameswithdirectx

    --James


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Tuesday, March 17, 2015 1:54 AM
    Moderator
  • Hi Jamles,

    That discussion did not help me, I am not trying to support integration with XAML like the article says. My game runs successfully in debug mode with no errors, the problem is at compiling in  release mode in Visual Studio 2015 (preview).

    Error is here at a HLSL file:

    float4 main(PixelShaderInput input) : SV_Target//error here
    {
        return Maping.Sample(LinearSampler, input.TexCoord);
    }

    I'm using shader model 4, level 9_3 ( DirectX 11.1). I want to make a release build of it, but I'm stuck at this error.


    Admir

    Tuesday, March 17, 2015 9:39 PM
  •      Hi Admir,

         I believe that the problem is that your shader's settings in "Release" are different than "Debug" configuration. That happened to me.

     * Change your proyect to "Release" if you haven't done so,
     * Righ-click on your shaders and go to properties,
     * On the new window, click on "HLSL Compiler"
     * Make sure the shader type is set ("vertex", "pixel", etc). This field is usually the guilty one.
     * Make sure you are also using the right level (the default is 9_1)

         I had to do this checking in "Release" for every shader I added in Debug.

         Note that I'm not integrating to XML either. I'm just creating games using plain and simple DirectX,

         I hope it helps!!!

         Tarh Ik

    PS: This posting has been posted "AS IS"


    Tarh ik


    • Edited by Tarh ik Friday, March 20, 2015 12:35 PM
    • Marked as answer by admiri92 Friday, March 20, 2015 5:48 PM
    Friday, March 20, 2015 12:33 PM
  •      Hi Admir,

         I believe that the problem is that your shader's settings in "Release" are different than "Debug" configuration. That happened to me.

     * Change your proyect to "Release" if you haven't done so,
     * Righ-click on your shaders and go to properties,
     * On the new window, click on "HLSL Compiler"
     * Make sure the shader type is set ("vertex", "pixel", etc). This field is usually the guilty one.
     * Make sure you are also using the right level (the default is 9_1)

         I had to do this checking in "Release" for every shader I added in Debug.

         Note that I'm not integrating to XML either. I'm just creating games using plain and simple DirectX,

         I hope it helps!!!

         Tarh Ik

    PS: This posting has been posted "AS IS"


    Tarh ik


    Hi Tarh ik,

    Your answer helped me a lot to solve the problem, error was caused because I had different shader levels for different shader files, and "pixel"or "vertex" shader type was not set for each pixel/vertex shader file. Now I am able to make a release build of it without any errors.

    Thank you!


    Admir

    Friday, March 20, 2015 5:47 PM