The process is as follows for Visual Studio 2010 and above (but should be similar for previous versions):
- On the menubar go to:
'Tools' --> 'Options' - Go to
'Project and Solutions' --> 'Build and Run' - There you can find a combobox under the label
'On run, when build or deployment errors occur...'. Select an appropriate option.