Thanks for all who attended my session yesterday at the Charlotte Code Camp. I always look forward to a full crowd in Charlotte and I apologize for those folks who may have had to stand for a bit. Hopefully it worth the discomfort :)  As promised I've attached the demo code I used during the presentation to this post. The last couple demos which I spun through pretty quick are also included. Although this is my 4th visit to the Charlotte Code Camp I always seem to forget that the sessions are only 1 hour instead of  the typical 1 hour and 15 minutes and I could have really used that extra 10 minutes.

Many of you had some questions after the presentation on some of the extra tools I was using. As I mentioned in my presentation the developer experience in Visual Studio really isn't there yet for SharePoint so I rely on a combination of automation and community tools to fill in the gaps.

 

VS_SS

 

There are several areas of interest in my IDE

  • On the far left is Andrew Connell's Visual Studio plug-in that provides some automation on the creation of solution package supporting files (ddf & manifest) and the standardization of the Visual Studio's solution structure that comes into play with additional automation. more detail's on AC's tool can be found at http://www.andrewconnell.com/blog/archive/2008/04/10/Announcing-ACs-VS-SharePoint-Project-Utility-Tool-Window.aspx . It's still beta and has a few gotchas but its my favorite tool so far because it doesn't have any project dependencies.
  • On the top is a custom toolbar that has external tool button links located on it. Others have implemented this functionality as custom build targets within the project file but I've found I prefer the buttons. You're mileage may very. These buttons are able to work because all of my projects follow a established structure I can infer some functionality based on this structure. My toolbar includes:
  1. WSP Add Solution:  stsadm -o addsolution -filename  "$(ProjectDir)\DeploymentFiles\$(TargetName).wsp"
  2. WSP Solution Deploy: stsadm -o deploysolution -local -allowgacdeployment -allcontenturls -force -name  $(TargetName).wsp
  3. WSP Solution Upgrade: -o upgradesolution -local -allowgacdeployment -name $(TargetName).wsp  -filename "$(ProjectDir)DeploymentFiles\$(TargetName).wsp
  4. WSP Solution Retract: stsadm -o retractsolution -local -allcontenturls -name $(TargetName).wsp
  5. WSP Solution Deleted: stasadm -o deletesolution -name $(TargetName).wsp
  6. Quick Deploy: /e /y $(ProjectDir)\RootFiles\TEMPLATE\* "c:\program files\common files\microsoft shared\web server extensions\12\Template"
  7. IIS App Pools: appcmd.exe list wp ** only works with windows server 2008
  8. Public Key: sn.exe -Tp "$(TargetPath)"
  • Lastly you may have noticed that I used a custom project template. My project template is actually a simple modification to standard c# library project that includes an extra build step that creates a solution package at build time.

<Target Name="AfterBuild">
   <Exec Command="C:\Windows\System32\MAKECAB.EXE /F DeploymentFiles\BuildSharePointPackage.ddf /D CabinetNameTemplate=$(Targetname).wsp /D DiskDirectory1=DeploymentFiles " />
   <Exec Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU'" Command="C:\Windows\System32\MAKECAB.EXE /F DeploymentFiles\BuildSharePointPackage.ddf /D CabinetNameTemplate=$(Targetname).cab /D DiskDirectory1=DeploymentFiles" />
</Target>

 

The demo code and projects can be downloaded at SharePoint for ASP.NET Demo Code. Thanks again for attending my session. I look forward to seeing you all next time.