I don’t remind where I originally got this Tip, but it’s proven to be very useful to save lots of time when you have very big solution and your projects are failing to build.
I am reporting it here as a note to myself because I really missed it when I had to install fresh copies of Visual Studio on new machines.
It’s basically a simple piece of macro you can add to the Visual Studio ‘EnvironmentEvents’ module:
- Go to Tools -> Macro -> Macros IDE...
- Look for MyMacros \ EnvironmentEvents in the project explorer tree.
- Add this piece of code inside the module:
' A project failed to compile, so cancel the build and beep Private Sub BuildEvents_OnBuildProjConfigDone(ByVal Project As String, ByVal ProjectConfig As String, ByVal Platform As String, ByVal SolutionConfig As String, ByVal Success As Boolean) Handles BuildEvents.OnBuildProjConfigDone If Success = False Then DTE.ExecuteCommand("Build.Cancel") Beep() Threading.Thread.Sleep(250) Beep() Threading.Thread.Sleep(250) Beep() Threading.Thread.Sleep(250) Beep() End If End Sub
- Enjoy.
I’m sad I cannot provide the original author with the right credits for it, if any have that info please let me know and I’ll update this post.
Related Content
- NUnitit: Visual Studio Addin to support NUnit and some customizations to it (26/08/2015)
- Resharper and the OutOfMemoryException problem (26/08/2015)
- Spot Hidden Exceptions using IntelliTrace (26/08/2015)
- Visual Studio 2010 designer error: Value cannot be null. Parameter name: objectType (26/08/2015)
- VS2008 SP1 + PowerCommands = Toolbox AddItems...Crash! (26/08/2015)
- More related document (10)