Visual Studio 2008 Team Foundation Server Build (Team Build) and VSeWSS 1.3 February 2009 CTP


I couldn’t wait to try out the latest VSeWSS 1.3 CTP due to the fact I could not get the January 2009 CTP to work properly with Visual Studio 2008 SP1 on Windows Server 2008 Standard Edition (x32) and MOSS 2007 SP1, let alone Team Build.

After you install the February 2009 CTP you might find that you get an error which is due to the fact that the application pool must be recycled for the Central Administration Site.  The identity for this pool must also be a member of the local administrators group. 

Here is the error I got trying to package a WSP immediately after installing the latest CTP:

VSeWSS Service Logging Error: Access to the path ‘Microsoft\VSeWSS 1.3’ is denied.

Logging failed attempting to write to Microsoft\VSeWSS 1.3\VSeWSS1.3 service.log. This may occur because the VSeWSS WCF Service does not have local administrator permissions. Please review the release notes.

If you have verified that the identity is a member of the local administrators group then perform an IISRESET at a command prompt after which VSeWSS 1.3 will work properly.

The first thing I wanted to do was create a Team Build target to build a sample feature which you can see below:

<Target Name="AfterCompile"
          DependsOnTargets="VSeWSSExample">
  </Target>

  <Target Name="VSeWSSExample">
    <GetBuildProperties TeamFoundationServerUrl="$(TeamFoundationServerUrl)"
                        BuildUri="$(BuildUri)"
                        Condition=" '$(IsDesktopBuild)' != 'true' "/>

    <!-- Put up the start processing message – we'll clear it later -->
    <BuildStep TeamFoundationServerUrl="$(TeamFoundationServerUrl)"
               BuildUri="$(BuildUri)"
               Message="VSeWSS 1.3 build step is executing."
               Condition=" '$(IsDesktopBuild)' != 'true' ">
      <Output TaskParameter="Id" PropertyName="VSeWSSExampleStep" />
    </BuildStep>
    
    <Exec Command="&quot;C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\devenv&quot; 
&quot;$(SolutionRoot)\dev\source\samples\source\TFSExamples\wss.sln&quot; /deploy Debug /package"
/> <!-- Create a collection of files to scan, the ** means subdirectories --> <CreateItem Include="$(SolutionRoot)\**\*.wsp"> <Output TaskParameter="Include" ItemName="SharePointFeatures"/> </CreateItem> <Message Text="SharePointFeatures @(SharePointFeatures)"/> <Copy SourceFiles="@(SharePointFeatures)" DestinationFolder="$(OutDir)" /> <!-- Complete the VSeWSS 1.3 build step, we get here if we have not thrown an error --> <BuildStep TeamFoundationServerUrl="$(TeamFoundationServerUrl)" BuildUri="$(BuildUri)" Id="$(VSeWSSExampleStep)" Condition=" '$(IsDesktopBuild)' != 'true' " Status="Succeeded" Message="VSeWSS 1.3 Succeeded"/> </Target>

This was the output from Team Build

VSeWSS 1.3 Team Build Summary

You could have also been running a desktop build from a Visual Studio Command Prompt to make sure all is well before you check in the tfsbuild.proj file.

image

Editing the tfsBuild.proj file can be made a bit easier with a great tool called Team Foundation Sidekicks, it has a Build Type Editor extension on the Build Project right click.  This allows you to check-out and edit then check-in with fewer clicks.  This is a great add-on to Visual Studio which after a while you’ll wonder how you lived without it.

About wesmacdonald

Wes MacDonald is a Visual Studio ALM MVP, PSD, MCT and a Principal Consultant for LIKE 10 INC., a SharePoint Server, Visual Studio and Team Foundation Server Consulting Firm providing premium support and guidance services.

2 Responses to “Visual Studio 2008 Team Foundation Server Build (Team Build) and VSeWSS 1.3 February 2009 CTP”

  1. Tried your code and it worked perfectly! One thing tho – how do we copy the setup.bat files to our release folder? i guess we even have to rename them on copying, or else they will just be overwritten? (in case of several projects in one soluion). Should we change to AfterCompileProject ?

  2. Before/AfterCompileProject is not really supported in Team Build 2008 in the same way as Before/AfterCompileSolution targets so I do not think that will be an option in your case (without a work around). If you want to keep the setup.bat that is generated then you will have to rename it during the copy.Wes

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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 )

Google+ photo

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

Connecting to %s

%d bloggers like this: