STSDev 2008

STSDev 2008 New Release

I have just released completed work on STSDev 2008 Version 2.0.1 which provides a number of fixes to the original 2.0 version.

Fixes

In STSDev 2008 the attempt was made to read through the project file and find all the “dependent” assemblies so they could be deployed with the solution.  This lead to a number of issues when trying to find those assemblies, so in STSDev 2008 v2.0.1  only assemblies in the build output folder are included in the Manifest.xml file.  This allows developers to “choose” what assemblies to deploy in their solution simply by setting the “copy local” option on your reference assembly.  Once the assembly is copied to your build output folder STSDev 2008 will include it in your solution.

**Issue Alert: If you are deploying an assembly that inherits from another assembly deployed in a separate solution and you have not copied this assembly to your development machine GAC you may see an error comment in the assemblies/assembly section of your manifest.xml file.  This occurs because STSDev 2008 attempts to load your assembly and determine if there are any controls published that require a “safe control” section in your manifest.xml file.  During this process if the parent assembly is not deployed to the GAC then the current assembly load will fail and no safe controls can be written.  In the error message you will see the Full Name of the assembly that could not be loaded, simply install this assembly to the GAC.  You may need to restart Visual Studio after doing this for the newly installed assembly to be recognized by STSDev 2008.

In STSDev 2008 v2.0 and v2.0.1 the CAB file builder reads from the manifest.xml file in-order to determine locations of the assembly file(s).  If there was an error building the manifest.xml file in v2.0 an exception would be thrown and you would have to go and manually delete the manifest.xml file.  In v2.0.1 the manifest.xml additional error handling has been added to the process for building the manifest.xml file so that even if errors occur in the creation process the manifest.xml will still include proper xml.

In STSDev 2008 v2.0 the template and feature section could sometimes get written to the manifest.xml file even if no template or feature objects were included in the project.  This would cause an error when attempting to load the solution in SharePoint which would require the user to manually fix the manifest.xml and recreate the solution file.  In STSDev 2008 v2.0.1 the template and feature sections are not written unless they contain at least one child element.

Use with VSeWSS 1.3

I have not yet completed my testing with v2.0.1 but initial results appear to indicate that with some changes to the SharePoint Target file STSDev 2008 v2.0.1 will be able to successfully build the projects created using VSeWSS 1.3 from Microsoft.  I believe this to be important as VSeWSS is the recommended tool for SharePoint 2007 projects from Microsoft and they will include a method of upgrading these solutions to the Visual Studio 2010 and SharePoint 2010 projects.  When I am totally satisfied with the steps I will update this blog to include them.

Advertisements

Using the StsDev tool for MOSS Solutions

I have been maintaining and enhancing the stsdev project from codeplex as part of the HarmonieWeb Configuration Management and it is now at a state where most anyone within the company could take the product and make use of it.  Here I am working on documenting the changes/bug fixes we have done to get the product to where it is today.

 
 

Before reading this entire post you should take a look at the stsdev codeplex project (http://www.codeplex.com/stsdev).  There are three videos that will get you going on how to use stsdev, and will make the rest of this information actually make sense to you.

 
 

Enhancements

  1. The original version of stsdev provided no method of deploying web parts unless used as part of a feature and contained in the feature.xml or element.xml. 
    1. Now by placing the .dwp or .webpart file(s) in the RootFolders location and adding the <DwpFiles>…</DwpFiles> section to the SolutionConfig.xml file the webparts can be deployed the same as before.
  2. There are several default project types, all of which required some level of work to change the various files to have the correct feature icons, web part gallery icons, and web part gallery group.
    1. Thanks to the stsdev API two new projects (MicroLink GAC WebParts and MicroLink CAS WebParts) the proper MicroLink Logo is set for the feature icon as well as the web part’s web part gallery icon.  The webparts are also grouped into a MicroLink LLC. WebParts group by default.
  3. stsdev creates a custom targets file for use with building the application.  In this file was stored the absolute path of stsdev when the targets files was created.  Thus if two developers used stsdev but had it in different locations, then they would constantly have issues.
    1. The new stsdev installer now adds the stsdevpath as an environment variable so that it can be referenced in the target file rather than the absolute path.
  4. The wsp destination location has been changed to the bin/[configuration] location.  This supports the MSBuild when executed on TFS.

Bug Fixes

  1. stsdev originally seemed to allow a user to select the strong name key and use it for assembly signing, but this never worked.  In the end you had to use a strong name key the application created.
    1. Selection and Use of the desired strong name key is now working.
  2. stsdev provides several debugxxx configuration options, which really save a LOT of time.  However, only the DebugBuild ever contained debugging information, thus all that time saved was for not!
    1. Now All Debugxxx configurations include full debugging
    2. Also noted was that the ReleaseBuild included debugging information.  This has now been changed so that no debugging information is included.
  3. stsdev included a releasebuild configuration, however it would always fail because it was unable to find the .ddf file.  However, thanks to Athens Holloway, the correction to the target file was made to not delete the .ddf but rather delete the wsp file.
  4. The projects created by stsdev set the Generate Serialization dll to automatic, however this version now sets that to Off.  This prevents the build from failing with an sgen.exe error.

So now that you see what has been fixed in stsdev, what does it do for you?

STSDEV is a windows console application that creates VS2005 and VS2008 projects/solutions with custom build targets so you can easily build and deploy your SharePoint solution to your local development SharePoint instance.  The tool can be added to your Tools menu so that when you need to create a new SharePoint solution it is easily accessable. 

STSDEV handles the creation and updating of the manifest.xml, and makecab ddf file.  It also provides some of the other useful files, like feature.xml and element.xml as well as initial webpart files.  That means when you build using STSDEV the output of your project is a wsp, you don’t need the CAB projects any more, and the advanced layouts are formatted propertly for SharePoint.

STSDEV is currently the project creation tool picked by the Harmonie Web team and we have made the necessary enhancements to allow it to work with the TFS build process.  We would highly recommend that everyone take a look at using this with their SharePoint solutions.

I am currently working with Athens Holloway about including the capabilities he has created to allow deployment of SharePoint solutions to remote SharePoint servers.  The end goal will be that as part of your build process you will deploy, retract, upgrade, etc your solution to a remote server ALL from within Visual Studio!

STSDev 2008 Goes Live

STSDev 2008, MicroLink LLC’s codeplex project, is now a publicly available CodePlex project. STSDev 2008 is a more production ready version of the original STSDev project created by Ted Pattison and his team. We have taken their code, corrected several build target and application errors as well as improved the ability of users to develop other custom solutions.

STSDev 2008 is a Visual Studio 2008 Windows Application project now available at:
http://www.codeplex.com/stsdev2008

What is STSDev 2008

STSDev 2008 is an external tool for creating SharePoint solutions. This tool provides unique build targets that allow you to build, deploy, and even retract your solution to your local SharePoint instance. This solution is helpful because it removes the need for you to maintain a manifest.xml and cab .ddf file, just by following the standard SharePoint 12 folder, hive, structure your files will be deployed to the appropriate locations.

STSDev 2008 also provides some default project types to make SharePoint development easier and faster. Some of these include Web Part, Web Service, and Site Application Page projects.

STSDev 2008 Language Support

STSDev 2008 currently only supports Visual Studio 2005 and 2008 C# language projects.

STSDev2008

Coming Soon the CodePlex Community STSDev 2008. 

This is an enhancement of the current CodePlex STSDev project, but we have moved to Visual Studio 2008 and fixed many of the bugs reported to the STSDev project.  We are also working on making this project easier to extend with custom solution builders which can do anything from a new solution file type to just customizing the look and feel of the project to meet a companies needs.