2016-03-09 38 views
1

我最近將Wix修復爲版本4.0。將Wix Project移植到版本4.0

更新命名空間Visual Studio(2015)不會識別這些新的命名空間。

<?xml version="1.0" encoding="utf-8"?> 
<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs"> 
    <Product Id="*" Name="_any_name" Language="1033" Version="1.0.0.0" Manufacturer="Anyone" UpgradeCode="8c568038-54cf-43ff-aa2c-581f4dd0aea0" Codepage="1252"> 
     <Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine" /> 
    <MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed." /> 
    <MediaTemplate EmbedCab="yes" /> 
    <Feature Id="ProductFeature" Title="_any_title" Level="1"> 
     <ComponentGroupRef Id="group_ProductComponents" /> 
    </Feature> 
    <Property Id="pro_SetupExe" Value="INSTALLFOLDER" /> 
    <CustomAction Id="ca_LaunchSetupExe" Property="pro_SetupExe" ExeCommand="/FORCE_HIDE_FIRST_RUN /UNATTENDED_INSTALL /AUTOACCEPT_ALL /FORCE_CLOSE_WHEN_DONE /ON_REBOOT_MESSAGE:」NO」" Execute="commit" /> 
    <CustomAction Id="ca_SetSetupPath" Property="pro_SetupExe" Value="[INSTALLFOLDER]x64ATIDriver\setup.exe" /> 
    <InstallExecuteSequence> 
     <Custom Action="ca_SetSetupPath" Before="ca_LaunchSetupExe" /> 
     <Custom Action="ca_LaunchSetupExe" Before="InstallFinalize" /> 
    </InstallExecuteSequence> 
    </Product> 
    <Fragment> 
     <Directory Id="TARGETDIR" Name="SourceDir"> 
      <Directory Id="TempFolder"> 
       <Directory Id="INSTALLFOLDER" /> 
      </Directory> 
     </Directory> 
    </Fragment> 
</Wix> 

的維克斯元件具有的 'http://wixtoolset.org/schemas/v4/wxs' 不正確的命名空間。請把維克斯元素如下所示:維克斯的xmlns = 「http://schemas.microsoft.com/wix/2006/wi

我founde這些:Migrate Wix Project to v4.0 instructions

但我不明白這是什麼意思:

修復:明確將File元素中缺少的Id屬性設置爲來自Source屬性的Name屬性或文件名。

所以目前我只是那種「墜毀」的項目,不能建立。

我真的很感謝一些幫助。

認爲Muffex

+0

請爲第一個問題添加您的代碼。第二種方法需要定義與文件元素中name屬性相同的id屬性。 –

+0

已添加代碼。 – Muffex

回答

3

命名空間的錯誤使得它聽起來像項目仍然由維克斯V3內置。另外,遷移到您發現的v4頁面的WixCop工具可以自動執行您在那裏找到的所有內容。它位於WiX安裝目錄的bin目錄中。

+0

那麼,就我不需要任何Wix 4.0的新功能而言,我重新安裝了舊版本(v3.10)。恕我直言wixcop.exe有很少的文檔。感謝您的回答。 :) – Muffex