SharePoint development bat script

Here´s a copy of a script that I use when developing on SharePoint. What it does is to add all my project assemblies to the global assembly cache, it copies files to the 12 hive and finally recycles the “SharePoint – 80” application pool. Useful if you, like me, feel the need to use more than just “one” dll when developing your SharePoint applications.  

SET D=”C:\Blog”
SET GAC=”C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\Bin\gacutil.exe”
SET T=”C:\Program Files\Common Files\Microsoft Shared\web server extensions\12″

%GAC% /if %D%\SharePoint.Utilities\bin\debug\SharePoint.Utilities.dll
%GAC% /if %D%\SharePoint.UI\bin\SharePoint.UI.dll

xcopy /e /y %D%\Contoso\Contoso.OrderApplication.SharePoint\12\* %T%

cscript.exe //NoLogo c:\windows\system32\iisapp.vbs /a “Sharepoint – 80” /r

if you want to use it, change the D=C:\Blog to your working dir and of course the names of the projects and dlls (remember that webapp projects do not have a debug/release bin folder). Put it in a bat file and place a shortcut to it on the quickstarts and off you go.


Note: Thanks to Joel Ottosson who originally wrote this script.



  1. Leave a comment

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: