4

VS 2012でWixを使用してインストールを構築しようとしていますが、「外部」参照を追加できません

私のプロジェクトFirmwareUploadがあります。これは、当社のフレームワークへの参照とともにインストールしたいものです。そして、私のインストーラープロジェクトであるFirmwareUploadSetup。このプロジェクトの参照を他のプロジェクトに追加し、XMLを作成しました。

<ComponentGroup Id="ProductComponents" Directory="INSTALLFOLDER">
  <Component Id="MainEXE">
    <!-- TODO: Insert files, registry keys, and other resources here. -->
    <File Source="$(var.FirmwareUpload.TargetPath)">
      <Shortcut Id="startmenuFWU10" Directory="ProgramMenuDir" Name="Firmware Upload 1.0"
                WorkingDirectory="INSTALLDIR" Advertise="yes" />
      <Shortcut Id="desktopFWU10" Directory="DesktopFolder" Name="Firmware Upload 1.0"
                WorkingDirectory="INSTALLDIR" Advertise="yes" />
    </File>

  </Component>
  <Component Id="AstuFMS">
    <File Source="$(var.Astus.FMS.TargetPath)" Name="Astus.FMS.dll" ShortName="AF" />
  </Component>
  <Component Id="AstusServerBusinessLogic">
    <File Source="$(var.Astus.Server.BusinessLogic.TargetPath)" Name="Astus.Server.BusinessLogic.dll"
          ShortName="ASBL" />
  </Component>
  <Component Id="ETL">
    <File Source="$(var.ETLElectronique.TargetPath)" />
  </Component>
  <Component Id="ETLBusiness">
    <File Source="$(var.ETLElectronique.Business.TargetPath)" Name="ETLElectronique.Business.dll" ShortName="EB" />
  </Component>
  <Component Id="ETLCommon">
    <File Source="$(var.ETLElectronique.Common.TargetPath)" Name="ETLElectronique.Common.dll" ShortName="EC" />
  </Component>
  <Component Id="ETLData">
    <File Source="$(var.ETLElectronique.Data.TargetPath)" Name="ETLElectronique.Data.dll" ShortName="ED" />
  </Component>
  <Component Id="ETLNet">
    <File Source="$(var.ETLElectronique.Net.TargetPath)" Name="ETLElectronique.Net.dll" ShortName="EN" />
  </Component>
  <Component Id="ETLWindows">
    <File Source="$(var.ETLElectronique.Windows.TargetPath)" Name="ETLElectronique.Windows.dll" ShortName="EW" />
  </Component>
</ComponentGroup>

これは動作します!! インストーラーを実行すると、これらのファイルが自分のディレクトリにあります。ただし、ソフトウェアを実行するために必要な他のファイルがあります(例:log4net.dll)

「FirmwareUpload」プロジェクトをコンパイルすると、log4net.dll(および他の多くのプロジェクト)が取得されます。したがって、インストール後にプログラムを実行するには、インストールにこれらのDLLが必要です。

することによって働いた:

 <ComponentGroup Id="DocumentationComponents" Directory="INSTALLFOLDER" Source="C:\fms\hotfix\v42x\V6\Utilitaire\FirmwareUpload\FirmwareUpload\bin\Debug">
      <Component Id="log4net">
        <File Name="log4net.dll" />
      </Component>
      <Component Id="Astus.Device.Configuration">
        <File Name="Astus.Device.Configuration.dll" />
      </Component>
      <Component Id="Astus.Device">
        <File Name="Astus.Device.dll" />
      </Component>
      <Component Id="Microsoft.Practices.EnterpriseLibrary.Common">
        <File Name="Microsoft.Practices.EnterpriseLibrary.Common.dll" />
      </Component>
      <Component Id="Microsoft.Practices.EnterpriseLibrary.Data">
        <File Name="Microsoft.Practices.EnterpriseLibrary.Data.dll" />
      </Component>
      <Component Id="Microsoft.Practices.EnterpriseLibrary.ExceptionHandling">
        <File Name="Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.dll" />
      </Component>
      <Component Id="Microsoft.Practices.ObjectBuilder">
        <File Name="Microsoft.Practices.ObjectBuilder.dll" />
      </Component>
    </ComponentGroup>

しかし、「ハードコーディングされていない」方法はありますか?

4

1 に答える 1

5

(「ハーベストツール」)を使用heatしてフォルダをスキャンし、そのフォルダにファイルを含めるために必要なxmlを生成できます。

http://wix.sourceforge.net/manual-wix3/heat.htmを参照してください

于 2013-03-26T18:05:21.387 に答える