Force Left Nav To at least 200 Pixels wide
Other Blogs
There are no items in this list.
Force Body To at least 500 Pixels high
SharePoint MindsharpBlogs > Todd Bleeker > Posts

 Single Post

Sep 04
Published: September 04, 2009 11:09 AM by  Todd Bleeker

For those of you that want the simplest possible way to deploy SharePoint artifacts from your Visual Studio 2005/2008 projects to the locations where Windows SharePoint Services 3.0 (WSS v3) needs them without installing any external tools or altering Visual Studio, here is the entire corpus of my Post Build Events for the development deployment of all types of SharePoint artifacts:

:: Change directory to the root of the project
cd "$(ProjectDir)"

:: Recycle the application pool
:: IIS6:
REM %windir%\system32\cscript.exe %windir%\system32\iisapp.vbs /a "[AppPool]" /r
:: IIS7:
REM %windir%\system32\inetsrv\appcmd.exe recycle AppPool "[AppPool]"

:: Copy all files from the VS.NET Project's 12 folder to the WSS 12 Hive (including subdirectories)
REM xcopy "12" "%CommonProgramFiles%\Microsoft Shared\web server extensions\12\" /ys

:: Copy all files from the VS.NET Project's 80 directory to the Web Application IIS home directory
REM xcopy "80" "C:\Inetpub\wwwroot\wss\VirtualDirectories\[Site]\" /ys

:: Install (force/overwrite) DLL to the GAC
REM %WindowsSdkDir%bin\GacUtil.exe" /if "$(TargetPath)"

:: Create a WSP CAB

Be sure to replace the [AppPool] and [Site] placeholders with the actual values you are using to test.

Simply run these commands in the Post Build Events of your Visual Studio project and unREM the lines that you need for any given developer deployment scenario. I believe that these commands will work in every operating system version, every Visual Studio version, and every IIS version. The only potential problem would be whether Visual Studio 2005 defines the %WindowsSdkDir% variable or not; however, I no longer have an environment that I can test that out on.

Just to be clear, these are only to be used on a developer machine. You should _always_ use a Windows SharePoint Services Solution Package (WSP) CAB to deploy to any environment other that your local developer environment.


<Todd />


No comment(s) to show

 Add Comment

* Required Field
Your Name *
Your Blog Url
Message Subject *
Message Body *