Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/wix/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
.net 在WIX中创建一个简单的网站MSI安装程序_.net_Wix_Windows Installer_Wix3.5 - Fatal编程技术网

.net 在WIX中创建一个简单的网站MSI安装程序

.net 在WIX中创建一个简单的网站MSI安装程序,.net,wix,windows-installer,wix3.5,.net,Wix,Windows Installer,Wix3.5,我一直在尝试使用以下WIXXML创建MSI来安装网站 我对这个很陌生,但是WIX有一个相当好的学习曲线,所以我已经得到了下面的代码片段所指示的程度 当我遇到以下错误时,它目前无法编译: 未解析对“产品:*”部分中符号“WixComponentGroup:C_WebAppContent”的引用。 我只想做以下几件事 将网站安装到D:\websites\website 设置虚拟目录 设置应用程序池 就这样。。。下面的问题我哪里做错了 Product.wxs <?xml version="1.0

我一直在尝试使用以下WIXXML创建MSI来安装网站

我对这个很陌生,但是WIX有一个相当好的学习曲线,所以我已经得到了下面的代码片段所指示的程度

当我遇到以下错误时,它目前无法编译:

未解析对“产品:*”部分中符号“WixComponentGroup:C_WebAppContent”的引用。

我只想做以下几件事

将网站安装到D:\websites\website 设置虚拟目录 设置应用程序池

就这样。。。下面的问题我哪里做错了

Product.wxs

<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" 
     xmlns:iis="http://schemas.microsoft.com/wix/IIsExtension"
     xmlns:util="http://schemas.microsoft.com/wix/UtilExtension" 
     xmlns:netfx="http://schemas.microsoft.com/wix/NetFxExtension">

  <!--NEVER EVER EVER EVER CHANGE THE UPGRADE CODE!!!!!!!!!!!!!!! -->
  <?define UpgradeCode="176df50b-d3aa-4f25-ae7b-2098a6b881b2" ?>

  <Product Id="*" 
           Name="MdxWebsite" 
           Language="1033" Version="1.0.0.0" 
           Manufacturer="RBS" 
           UpgradeCode="$(var.UpgradeCode)">
    <Package InstallerVersion="200" Compressed="yes" />

    <!-- This includes our properties that implement the "Remember Property" pattern -->
    <?include Configuration.wxi ?>

    <Media Id="1" Cabinet="media.cab" EmbedCab="yes" />

    <MajorUpgrade AllowDowngrades="no" 
                  AllowSameVersionUpgrades="yes" 
                  Schedule="afterInstallInitialize"
                  DowngradeErrorMessage="A later version of this product is already installed. Setup will now exit."/>

    <!-- Creating default directory structure (INSTALLLOCATION be override by user, but it starts in Program Files) -->
    <Directory Id="TARGETDIR" Name="SourceDir">
      <Directory Id='ProgramFilesFolder' Name='PFiles'>
        <Directory Id="INSTALLLOCATION" Name="TheDefaultInstallFolderName">
        </Directory>
      </Directory>
    </Directory>

    <Feature Id="F_Content" 
             Title="Content" 
             Level="1" 
             Description="The website content" 
             ConfigurableDirectory="INSTALLLOCATION">
      <ComponentRef Id="C_RegistryEntries"/>
      <!-- The C_WebAppContent can either be generated by the WiX tool "heat", or a hand-crafted set of content, this component is not included in this example -->
      <ComponentGroupRef Id="C_WebAppContent" />
    </Feature>

    <Feature Id="F_IISWebsite" Title="IIS Website" Description="The IIS website and application pool" Level="1">
      <ComponentRef Id="C_IISWebsite" />
    </Feature>

    <InstallExecuteSequence>
    </InstallExecuteSequence>

    <!-- Specify UI -->
    <UIRef Id="UIFlow" />
  </Product>
</Wix>


因此,我能够通过在..\obj\Debug文件夹中的Visual Studio帮助中使用HEAT为输出创建的ID来修复此问题,其中是名为“C_WebAppContent”的组件。缺少此组件,这就是它抛出该错误的原因。这就是我试图生成的,我如何在Visual Studio中获取引用的web站点项目,然后获取获取的文件的id?这样我就可以为id C_WebAppContent的文件引用这些文件