Hooking Into Visual Studio's Native Build RRS feed

  • Question

  • Hi,

    I am building a Visual Studio extension which I would like to have wrap the native visual studio build with my custom tool.

    I can accomplish this from the command line with:

    mytool.exe devenv.com mySolution.sln [options]


    mytool.exe msbuild mySolution.sln [options]

    I would like to be able to apply this same wrapping during the build inside visual studio.


    I press Build->Build Solution

    My extension causes visual studio to launch mytool.exe (Native Build)

    This way I can wrap the actual build inside the IDE instead of attempting to construct an equivalent command line build.

    My need also applies to project and file level builds as well as the full solution example noted above.


    Right-Click a project => Build


    Select a c/c++ file => Build->Compile

    Any Advice is appreciated.



    Tuesday, February 5, 2013 4:46 PM

All replies

  • Hi Colin,

    I think you want to build the projects by your own build tool and you want to run it in the Visual Studio.

    I am suggesting refer to the article below which may be helpful to you:


    Best regards,

    Ego [MSFT]
    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.

    Thursday, February 7, 2013 5:09 AM
  • Hi Ego,

    Thank you for the suggestion.  I reviewed the documentation you linked and unless I am mistaken it provides methods for running commands Before/After a Build or replacing the Build mechanism with my own but not for wrapping the actual build which occurs.

    I am not looking to replace the native build with my own build tool but to wrap the build so that I can gain information about the build which Visual Studio runs.  I would still like Visual Studio to run the same build process it normally would, but wrapped by my tool.



    - I select Build->Build Solution

        - Visual Studio runs some build command (lets call it B)

    I would like to have:

    - I select Build->Build Solution

        - Visual Studio runs B as it normally would, but wrapped with myTool

            - ex) myTool.exe B

    This would allow me to obtain the information about the build I require.  Similar to how I can wrap a command line build with my tool.  

        -  myTool.exe Devenv.com someSolution.sln /Rebuild



    Wednesday, February 13, 2013 7:13 PM