gpt4 book ai didi

visual-studio - 未解析对部分中符号 'WixComponentGroup:MyWebWebComponents' 的引用

转载 作者:行者123 更新时间:2023-12-03 14:50:26 24 4
gpt4 key购买 nike

我正在关注以下代码,即 product.wxs 文件。但我面临如下错误:

错误 5 未解析对“产品:{}”部分中的符号“WixComponentGroup:MyWebWebComponents”的引用

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

<Product Id="702881b5-9a64-4ab8-ab47-f3babcd950a2"
Name="WixApplication" Language="1033"
Version="1.0.0.0"
Manufacturer="HexWireless"
UpgradeCode="42b7872b-78c8-4a0b-abcd-28a30c9804ab">

<Package InstallerVersion="200" Compressed="yes" Platform="x64" InstallScope="perMachine"/>

<!--<Media Id="1" Cabinet="media1.cab" EmbedCab="yes" />-->

<!--Find the Path to the sqlcmd.exe by performing a registry search. This is hardcoded for SQL 2012.
Change 110 to 100 for 2008. Might need to change the script too.-->
<Property Id="SQLBINDIR">
<RegistrySearch Id="SqlBinDir"
Root="HKLM" Key="SOFTWARE\Microsoft\Microsoft SQL Server\110\Tools\ClientSetup"
Name="Path"
Type="raw"
Win64="yes"/>
</Property>

<Condition Message="Microsoft SQL Server 2012 needs to be installed before this installer can run">
<![CDATA[SQLBINDIR]]>
</Condition>

<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="INSTALLLOCATION" Name="Database">
<Component Id="Database" Guid="a8dc2Fcd-087d-e393-b059-c67877e51b8a">
<File Id="DatabaseScript" Source="SQLScripts\HexWireless.sql"/>
<RemoveFile Id ="RemoveInstall.log" Name="Install.log" On="uninstall" />
</Component>
</Directory>

<Directory Id="INSTALLDIR" Name="PFiles">
<Directory Id="WixService" Name="Service">

<Component Id="WixWindowsServiceComponent" DiskId="1" Guid="6f51c0f3-776c-4aec-a200-1f199352c6c3" Win64="yes">
<File Id="WixService.exe" Name="WixService.exe" Source="$(var.WixService.TargetDir)\WixService.exe"/>
<ServiceInstall Id="InstallWixService" DisplayName="WixService" Name="WixService.exe" Description="WixService" Account="NT Authority\Network Service" ErrorControl="normal" Start="demand" Type="ownProcess" Vital="yes" />
<ServiceControl Id="ControlWixService" Name="WixService.exe" Stop="uninstall" Remove="uninstall" />
</Component>
</Directory>
</Directory>

<Directory Id="INSTALLFOLDER" Name="Publish">
</Directory>

</Directory>

<Feature Id="ProductFeature" Title="WebApplication" Level="1">
<Feature Id="Database" Title="Database" Description="DatabaseScript" Level="1" Display="expand"
AllowAdvertise="no" ConfigurableDirectory="INSTALLLOCATION" Absent="allow">

<Feature Id="WixWindowsServiceComponent" Title="Service" Description="WixService" Level="1" Display="expand"
AllowAdvertise="no" ConfigurableDirectory="INSTALLDIR" Absent="allow">

<ComponentGroupRef Id="WixWebsiteIssConfiguration" />
<ComponentRef Id="Database"/>
<ComponentRef Id="WixWindowsServiceComponent"/>
<ComponentGroupRef Id="MyWebWebComponents"/>
</Feature>
</Feature>
</Feature>

<Property Id="INSTALLDIR" Value="D:" />
<Media Id="1" Cabinet="WixWindowsServiceComponent.cab" EmbedCab="yes" />

<InstallExecuteSequence>

<!--If the database feature is selected these actions will run to install the DB-->
<Custom Action="Database.cmd" After="InstallFiles" >
<![CDATA[NOT Installed]]>
</Custom>

<!--Ensure this runs after the custom action to set up the properties for its cmd line-->
<Custom Action="Database" After="Database.cmd">
<![CDATA[NOT Installed]]>
</Custom>

</InstallExecuteSequence>

<UI>
<UIRef Id="GUI"/>
<UIRef Id="WixUI_ErrorProgressText" />
</UI>


<!--This is the sequence script. Best way to understand this is by running sqlcmd -?
Use "property" Custom action to get variable substitution working-->
<CustomAction Id="Database.cmd" Property="Database"
Value="&quot;[SQLBINDIR]sqlcmd.exe&quot; -E -S &quot;[SQLSERVER]&quot; -i &quot;[#DatabaseScript]&quot; -o &quot;[INSTALLLOCATION]HexWireless.log&quot;"/>

<!-- Note that the cmd line and args will come from a property with the same name as the custom action, this has been set by the custom action above -->
<CustomAction Id="Database" BinaryKey="WixCA" DllEntry="CAQuietExec" Return="check" Execute="deferred" Impersonate="yes" />

</Product>
</Wix>

提前致谢。

最佳答案

我不确定您的问题是否已解决,即使我使用 Wix 创建了其中一些 msi 文件,我也遇到了同样的问题。

就我而言,它没有找到我在项目中自动生成的“加热组件”。我不得不将此文件加载到项目中,(这些文件或文件夹可能在您的项目文件夹中,但在大多数情况下,VS 不会自动加载它们)。

您必须右键单击项目 -> 添加 -> 现有项目;并选择所需的文件/项目。

关于visual-studio - 未解析对部分中符号 'WixComponentGroup:MyWebWebComponents' 的引用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37699928/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com