Visual studio - building startup project

posted Sep 7, 2016, 12:47 AM by Nico Kruithof   [ updated Sep 7, 2016, 1:01 AM ]
This doesn't seem to work as expected yet!

You first need to download the macro editor for Visual studio 2013 from: https://visualstudiogallery.msdn.microsoft.com/d3fbf133-e51b-41a2-b86f-9560a96ff62b

Sub Build_Startup()
    DTE.ToolWindows.OutputWindow.Parent.Activate()
    Dim sb As SolutionBuild2 = DTE.Solution.SolutionBuild
    For Each item In sb.StartupProjects
        sb.BuildProject(sb.ActiveConfiguration.Name, item, True)
    Next
End Sub
Just put that in your macros - using the Macros IDE Alt + F11, and add a keyboard mapping to it (Tools/Customize/Commands/Keyboard, find your new command in the Macros. namespace), and you're all set.

From:
http://stackoverflow.com/questions/1714100/keyboard-shortcut-to-build-only-startup-project
Comments