SharePoint Development: Making that application pool recycle less annoying

Posted on 1/9/2011 @ 4:06 AM in #SharePoint by | Feedback | 367 views

If you’re like me, you’re easily distracted.

What was I talking about again? Oh yes! See, whenever I am writing a farm solution that requires an application pool recycle, I hit CTRL_SHIFT_B to deploy (how to remap CTRL_SHIFT_B to deploy?).
Now, I have what, a good 15-20 seconds to goof off and check my gmail/facebook/twitter/IM conversations, right?

Sure .. 30 minutes later .. my application pool has died and recycled 3 times on it’s own.


Clearly, this was becoming a serious issue. So what am I supposed to do here? Well, worry not! Here is what you need to do,

  • Right click\Properties on your SharePoint project, and look for the “SharePoint” tab.
  • Look for post-deployment command line, and add the following post-deployment command line. (Be careful, copy paste exactly as is).


powershell $wc = new-object net.webclient; $wc.credentials = [System.Net.CredentialCache]::DefaultCredentials;$wc.DownloadString('http://sp2010.winsmarts.internal').Substring(0,1); [System.Media.SystemSounds]::Asterisk.Play();


What am I doing in this post-deployment command line? I am hitting my SharePoint site (you may need to edit that URL), and when that download finishes, I am playing  a sound.
So that’s basically it, now whenever I hear that sound, I just need to train myself to come back to my SharePoint VM and continue working. That’s the hard part.

Sound off but keep it civil:

Older comments..

On 1/9/2011 4:51:31 AM Karel said ..
Hi, I suffer the same symptoms (Sharepoint development requires a lot of patience)! Thanks for the cure.

On 1/9/2011 9:55:09 AM René said ..
Nice idea :-)

Thanks for sharing.


On 1/11/2011 3:44:03 AM Steve Culshaw said ..
Nice tip

PS. the source code is clipped in Firefox 3.6.13 ... but not in IE 8