错误:用stsdev创建的解决方案:Makecab.exe — error MSB3073

 

问题描述:

命令“"C:"Windows"System32"makecab.exe" /F DeploymentFiles"SolutionPackage.ddf /D CabinetNameTemplate=test.wsp”已退出,返回值为 1

解决方案:

根据我所遇到的情况,错误原因是因为文件路径不对或文件没有找到,导致编译时找不到文件。

在项目的DeploymentFiles文件夹下有两个文件:

Microsoft.SharePoint.targets

SolutionPackage.ddf

如果是SolutionPackage.ddf里有文件没找到,可以在VS的“输出”信息看到错误原因;

然后将输出信息与Microsoft.SharePoint.targets的信息进行比较,就可以看到文件路径是否正确。

下面的是Microsoft.SharePoint.targets文件中的部门代码,用来定义文件路径:

 <PropertyGroup>

    <PackageName>Test.wsp</PackageName>

    <PackageFile>Test.wsp</PackageFile>

    <TargetUrl>http://litwareinc.com</TargetUrl>

    <ProjectDeploymentFilesFolder>DeploymentFiles</ProjectDeploymentFilesFolder>

    <ProjectRootFilesFolder>RootFiles</ProjectRootFilesFolder>

    <WssRootFilesFolder>"$(ProgramFiles)"Common Files"Microsoft Shared"web server extensions"12"</WssRootFilesFolder>

    <MAKECAB>"C:"Windows"System32"makecab.exe"</MAKECAB>

    <STSADM>"$(ProgramFiles)"Common Files"Microsoft Shared"web server extensions"12"bin"stsadm.exe"</STSADM>

    <STSDEV>"C:"Documents and Settings"Administrator"桌面"stsdev.exe"</STSDEV>

 </PropertyGroup>

posted @ 2009-07-23 17:55  LeimOO  阅读(898)  评论(0编辑  收藏  举报