【发布时间】:2012-01-25 16:06:27
【问题描述】:
我从最近离开的承包商那里继承了一个 WiX 项目。
当我构建 WiX 安装程序项目时,没有问题 - .msi 已按预期构建并输出。
但是当我“重建”WiX 安装程序项目时,.msi 再次被 light.exe 构建得很好,但随后被“CoreClean”删除。
更多信息:wix 项目打包(和引用)单个 Web 项目。
这是输出的sn-p:
ICE105: ICE105 - Validates the package to make sure that it can be installed in true Per-User mode
ICE105: Created 05/01/2008. Last Modified 05/21/2008.
Laying out media.
Moving file 'C:\Users\codemonkey\AppData\Local\Temp\nxkfdvui\AmazonWebsiteInstaller.msi' to 'C:\web\main\Amazon.Webby.Install\bin\Release\AmazonWebsiteInstaller.msi'.
Done executing task "Light".
...
...
Target "CoreClean" in file "C:\Program Files (x86)\MSBuild\Microsoft\WiX\v3.x\wix2010.targets" from project "C:\web\main\Amazon.Webby.Install\Amazon.Webby.Install.wixproj" (target "Clean" depends on it):
Task "ReadLinesFromFile"
Done executing task "ReadLinesFromFile".
Task "FindUnderPath"
Comparison path is "bin\Release\".
Done executing task "FindUnderPath".
Task "FindUnderPath"
Comparison path is "obj\Release\".
Done executing task "FindUnderPath".
Task "Delete"
Deleting file "C:\web\main\Amazon.Webby.Install\bin\Release\AmazonWebsiteInstaller.msi".
Deleting file "C:\web\main\Amazon.Webby.Install\bin\Release\AmazonWebsiteInstaller.wixpdb".
Deleting file "obj\Release\MainWixComponents.wixobj".
Deleting file "obj\Release\UploadContent.wixobj".
Deleting file "obj\Release\WebSiteContent.wixobj".
Deleting file "obj\Release\Product.Generated.wixobj".
Done executing task "Delete".
...
...
我在安装程序项目文件中找不到任何涉及 msi 或输出文件夹的删除任务,因此这是 Visual Studio 进行重建并认为它需要清除它没有的文件的结果。
这似乎是“C:\Program Files (x86)\MSBuild\Microsoft\WiX\v3.x\wix2010.targets”中的相关部分导致新构建的 msi 被删除:
<!--
==================================================================================================
CoreClean
Cleans all of the compile and link outputs as well as any intermediate files generated along
the way.
==================================================================================================
-->
<PropertyGroup>
<CoreCleanDependsOn></CoreCleanDependsOn>
</PropertyGroup>
<Target
Name="CoreClean"
DependsOnTargets="$(CoreCleanDependsOn)">
...
<!-- Delete those files. -->
<Delete Files="@(_CleanPriorFileWritesInOutput);@(_CleanPriorFileWritesInIntermediate)" TreatErrorsAsWarnings="true">
<Output TaskParameter="DeletedFiles" ItemName="_CleanPriorFileWritesDeleted" />
</Delete>
...
有什么想法吗?
谢谢。
【问题讨论】:
标签: visual-studio-2010 visual-studio wix windows-installer