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=""C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\devenv"
"$(SolutionRoot)\dev\source\samples\source\TFSExamples\wss.sln" /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
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.
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.