none
How to get CustomBuildStep to appear in a project Properties?

    Question

  • I have had to add a few CustomBuildSteps to my Visual Studio 2105 C++ projects. I could not find a way to add them via the Property pages for the projects (though I see references to things like 'In the Property Pages dialog box, navigate to the Configuration Properties, Custom Build Step, General page') so I added them by editing the .vxcproj files.

    I do not have a Configuration Properties, Custom Build Step, General page.


    How can I add the CustomBuildSteps to they appear within the projects property pages?

    Thanks.

     
    • Edited by RSullivan59 Wednesday, February 03, 2016 6:45 PM
    Wednesday, February 03, 2016 6:44 PM

Answers

  • Thanks Weiwei.

    I figured out that my .vxcproj was a Utility project.

    C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppBuild.targets will
    not include the $(VCTargetsPath)$(LangID)\custom_build_step.xml when the
    Configurationtype is 'Utility'.

    So I:
    1.) Created a targets file (My.CppBuild.targets) to include the $(VCTargetsPath)$(LangID)\custom_build_step.xml
        within my project.
    2.) Edited the .vcxproj file and added an  <Import Project="My.CppBuild.targets" />
        at the bottom of the file (before the closing </Project>).

    it is all good now.

    Thanks.

    • Marked as answer by RSullivan59 Thursday, February 04, 2016 4:21 PM
    Thursday, February 04, 2016 4:20 PM

All replies

  • Hi RSullivan59,

    Which version of Visual Studio 2015 are you using? Community, Professional or Enterprise?

    Based on your description, I open my project's properties window and select the Configuration Properties. I find the Custom Build Step tab and I can add my custom build steps on this tab. My Visual Studio version is Visual Studio 2015 with Update 1. If you don't install the Update 1, please download and install from below link.

    https://www.microsoft.com/en-us/download/details.aspx?id=49989

    In addition, please check whether install all C++ related options through Control Panel -> Programs and Features -> Visual Studio 2015 -> Change -> Modify.

    Best Regards,
    Weiwei

    Thursday, February 04, 2016 6:33 AM
    Moderator
  • Thanks Weiwei.

    I figured out that my .vxcproj was a Utility project.

    C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppBuild.targets will
    not include the $(VCTargetsPath)$(LangID)\custom_build_step.xml when the
    Configurationtype is 'Utility'.

    So I:
    1.) Created a targets file (My.CppBuild.targets) to include the $(VCTargetsPath)$(LangID)\custom_build_step.xml
        within my project.
    2.) Edited the .vcxproj file and added an  <Import Project="My.CppBuild.targets" />
        at the bottom of the file (before the closing </Project>).

    it is all good now.

    Thanks.

    • Marked as answer by RSullivan59 Thursday, February 04, 2016 4:21 PM
    Thursday, February 04, 2016 4:20 PM