Would be a nice thing - do I have to write a script or can't I just tweak the build script to do some task?
Asked
Active
Viewed 7,108 times
57
-
1possible duplicate of [How do I get notification that the local Visual Studio build is complete?](http://stackoverflow.com/questions/1710334/how-do-i-get-notification-that-the-local-visual-studio-build-is-complete) – Hans Passant May 14 '10 at 20:12
3 Answers
122
Windows already has support for this, go to the Control Panel and open up Sounds and Audio Devices. Under the Sounds tab there is a section for program events. If you scroll down far enough one of the sections will be Microsoft Visual Studio. Then just pick the sound you want to hear for Build Succeeded and Build Failed. You will need to restart Visual Studio after choosing your sounds.

tkburbidge
- 352
- 5
- 10

rjzii
- 14,236
- 12
- 79
- 119
-
Is there a way for this to work with a Team Foundation Server build? – Mathias Lykkegaard Lorenzen Feb 24 '14 at 18:38
-
7I've found that I have to restart Visual Studio to get it to restart this. *If* you can reproduce this behavior, this answer would be better if it mentioned that. – chwarr May 02 '15 at 01:22
-
1Is there a way to trigger a visual indication the build is complete rather than audio for VS 2017? – Manachi Dec 07 '17 at 03:33
-
3This doesn't work when Visual Studio is running as administrator. Any solution? – JazzSoft Mar 21 '18 at 22:06
-
@JazzSoft I had the same problem... I think you need to login to windows with your admin account, set that account's sound preferences, and then try it. Will let you know – Allen Rice Aug 11 '20 at 06:45
-
@JazzSoft I confirmed that it works! You need to set the sound preferences with your admin account logged in – Allen Rice Aug 11 '20 at 08:32
-
1More specifically for Windows 11, if you view the control panel in `Small icons` mode, you click `Sound`, then, in the Sound window, you click the `Sounds` tab and scroll down in the list until you see `Visual Studio`. – cyclingLinguist Jul 12 '23 at 21:09
5
If you don't want to enable it for every single build, you can make an application that plays a sound, and add it into the post build event for that project.

Peter Mortensen
- 30,738
- 21
- 105
- 131

StingyJack
- 19,041
- 10
- 63
- 122
4
I also wrote an extension for Visual Studio to achieve that. It also can play a sound when tests finished to run.

StingyJack
- 19,041
- 10
- 63
- 122

vmg
- 9,920
- 13
- 61
- 90
-
4The extension doesn't support any version higher than Visual Studio 2015. – blackboxlogic Apr 26 '19 at 17:51
-
@blackboxlogic - source is at https://github.com/thecoderok/vsdingextension if you want to fork and update (should be a fairly simple update). – StingyJack Aug 07 '23 at 00:22