Error in solution configuration ReleaseBuild

Jan 30, 2008 at 8:17 AM
Thanks for a really nice tool! Make my life a litle bit easier :)

However when I make a release build I get this error.

Could not find file: DeploymentFiles\SolutionPackage.ddf
The command ""C:\Windows\System32\makecab.exe" /F DeploymentFiles\SolutionPackage.ddf /D CabinetNameTemplate=WebPart.wsp" exited with code 1.

And after looking through the source code it seem's that there is an error in Microsoft.SharePoint.targets.xml more specifically in the ReleaseBuild target.

- Pontus Nyberg
Jan 30, 2008 at 9:43 AM
OK,

would someone then share what error there is and how to correct it?

-Thomas
Feb 4, 2008 at 6:45 PM
Edited Feb 4, 2008 at 6:46 PM
The ReleaseBuild target appears to have an erroneous reference to $(ProjectDeploymentFilesFolder)\SolutionPackage.ddf in the <Delete> task. Replace <Delete Files="$(ProjectDeploymentFilesFolder)\SolutionPackage.ddf " ContinueOnError="true" /> with <Delete Files="$(ProjectDeploymentFilesFolder)\$(PackageFile)" ContinueOnError="true" /> in the ReleaseBuild target to resolve.

The ReleaseBuild targert should look look like this:

<Target Name="ReleaseBuild" >
<Message Text="Deleting Pacakge File..." Importance="high" />
<Delete Files="$(ProjectDeploymentFilesFolder)\$(PackageFile)" ContinueOnError="true" />
<Message Text="Building Cab File (Release Version)" Importance="high" />
<Exec Command="$(MAKECAB) /F $(ProjectDeploymentFilesFolder)\SolutionPackage.ddf /D CabinetNameTemplate=$(PackageFile)" ContinueOnError="false" />
<Message Text="" Importance="high" />
</Target>
Feb 5, 2008 at 8:25 AM
Ok, this still does not solve the problem. The SolutionPackage.ddf file is still deleted and MAKECAB can't run.

-Pontus
Feb 5, 2008 at 3:30 PM
I should have mentioned this yesterday, but to get this to work, I made the following changes:

-modified the "ReleaseBuild" target (refer to previous post)
-rebuilt with the "DebugBuild" configuration as the stsdev /refresh is required to regnerate the .ddf file
-restarted visual studio to ensure nothing was cached
-rebuilt with the "ReleaseBuild" configuration

This worked for me, but If all else fails, fix it in the source code. The problem is clearly the <Delete> task that precedes the makecab execution. Hope this helps.


Pontus wrote:
Ok, this still does not solve the problem. The SolutionPackage.ddf file is still deleted and MAKECAB can't run.

-Pontus

Feb 6, 2008 at 5:52 AM
I solved the problem. This might be quite obvious but I didn't think of it. I was using a project that was generated with STSDEV before I changed the ReleaseBuild target and (obviously) it does not recreate the project once it has been created. When I created a new project it worked like a charm.

Thanks for helping me out with the bugg in the target.


athensholloway wrote:
I should have mentioned this yesterday, but to get this to work, I made the following changes:

-modified the "ReleaseBuild" target (refer to previous post)
-rebuilt with the "DebugBuild" configuration as the stsdev /refresh is required to regnerate the .ddf file
-restarted visual studio to ensure nothing was cached
-rebuilt with the "ReleaseBuild" configuration

This worked for me, but If all else fails, fix it in the source code. The problem is clearly the <Delete> task that precedes the makecab execution. Hope this helps.


Pontus wrote:
Ok, this still does not solve the problem. The SolutionPackage.ddf file is still deleted and MAKECAB can't run.

-Pontus


Apr 10, 2008 at 4:33 PM
Any of you guys noticed that the debug dll is packaged even though we are doing a "ReleaseBuild"?
The "/bin/debug" path seems to be hardcoded in the STSDEV sourcecode.
Jul 2, 2008 at 4:27 PM
Got the same problem here. "ReleaseBuild" is indead taking the dll in "/bin/debug". One quick way around that is to change the output path of the project in "ReleaseBuild" mode from "/bin/release" to "/bin/debug". Then the dll are being build in the same directory where the packaging is taking place. This is only a quick fix and the real solution would be to fix it in STSDEV.


oroussea2 wrote:
Any of you guys noticed that the debug dll is packaged even though we are doing a "ReleaseBuild"?
The "/bin/debug" path seems to be hardcoded in the STSDEV sourcecode.