我已經沿用了最近離開一個承包商維克斯項目。Visual Studio中的WiX安裝項目中刪除MSI輸出上重建
當我建立WiX的安裝工程,是沒有問題的 - 的.msi是建立和輸出符合市場預期。
但是,當我「重建」的WiX的安裝工程,再次的.msi建立只是light.exe罰款,但隨後獲得由「CoreClean」刪除。
進一步信息:該WiX工程包(和引用)一個web項目。
這是輸出的一個片段:
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".
...
...
我無法找到在涉及微星或輸出文件夾中安裝項目文件的任何刪除任務,所以它的Visual Studio中做了重建結果並認爲它需要清理它沒有的文件。
這似乎是在相關章節 「C:\ Program Files文件(x86)的\的MSBuild \微軟\維克斯\ 3.x版\ wix2010.targets」 導致刪除新建微星:
<!--
==================================================================================================
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>
...
任何想法?
謝謝。
不幸的是我沒有時間去試試這個。儘管我在3.6版本。我贊成你的答案,因爲它可能會幫助別人。 – jimasp