4

How to tell visual studio to rebuild every time I make a change when I hit the play or run exectuable button?

I am trying a c++ application

2 Answers2

4

Tool -- Option -- Projects and Solutions

I think your looking for this under Tool -- Option -- Projects and Solutions

I don't know that you can configure it to ReBuild (as compared to Build).

One option would be to record a macro and then attaching a hotkey to it.

I recorded this in VS2008

Option Strict Off
Option Explicit Off
Imports System
Imports EnvDTE
Imports EnvDTE80
Imports EnvDTE90
Imports System.Diagnostics

Public Module RecordingModule


    Sub RebuildThenRun()
    DTE.ExecuteCommand ("Build.RebuildSolution")
    DTE.Debugger.Go(False)
    End Sub
End Module
kevcoder
  • 883
  • 1
  • 15
  • 29
3

Check Tool->Options->Projects and solutions->Build and run->On Run, when projects are out of date" should be "Prompt to build" or "Always build"

dario_ramos
  • 7,118
  • 9
  • 61
  • 108
Pavel Kudinov
  • 405
  • 2
  • 8
  • 1
    ok, let's check Tool->Options->"Projects and solutions"->"Build and run"->"On Run, when projects are out of date" should be "Prompt to build" or "Always build" – Pavel Kudinov Sep 21 '12 at 11:26