Wednesday, April 16, 2008

STSDEV is pretty awesome, but...

I've begun using STSDEV as the start for my projects instead of VSeWSS. I like the simplicity of it, especially as Ted Pattison says in his first of three screencasts that you can load it into any installation of Visual Studio (that corresponds to the project type you created) because you don't rely on Add-ins/Extensions.

After running through the screencasts, I decided it was time to do the solution release build and I ran into immediate trouble with a "ERROR: Could not find file DeploymentFiles\SoulutionPackage.ddf ..." error message in the Output Window.

The solution, found on the STSDEV discussion board, is as follows:


  1. Modify the "ReleaseBuild" target in the DeploymentFiles\Microsoft.SharePoint.targets file as below (fix highlighted in bold red):

    <target name="ReleaseBuild">
    <message text="Deleting Pacakge File..." importance="high">
    <delete files="$(ProjectDeploymentFilesFolder)\$(PackageFile)" continueonerror="true">
    </delete>

    <message text="Building Cab File (Release Version)" importance="high">
    <exec command="$(MAKECAB) /F $(ProjectDeploymentFilesFolder)\SolutionPackage.ddf /D CabinetNameTemplate=$(PackageFile)" continueonerror="false">
    </exec>
    </message>
    </message>
    </target>



  2. Rebuild with the "DebugBuild" configuration
  3. Restart Visual Studio (to ensure nothing was cached)
  4. Rebuilt with the "ReleaseBuild" configuration

If you modify the Release Build configuration in the Microsoft.SharePoint.targets file right when you open the project for the first time after creating it in STSDEV it'll save you having to do the above steps.

No comments: