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.