[英]How to use VS2015_ROOT_FOLDER to set install location in Wix 3.10
我正在使用Wix 3.10在公共扩展文件夹中安装扩展。 但是我还无法弄清楚如何使用VS2015_ROOT_FOLDER
属性。
我在Product
元素中有以下内容:
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Product Id="*" Name="Test" Language="1033" Version="1.0.0.0" Manufacturer="MSFT" UpgradeCode="2c2ba7d9-387a-4da9-b7f2-82d737b839b6" Codepage="1252">
<Package InstallerVersion="500" Compressed="yes" InstallScope="perMachine" />
<PropertyRef Id="VS2015_ROOT_FOLDER" />
<MediaTemplate EmbedCab="yes"/>
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="VS2015_ROOT_FOLDER">
<Directory Id="TSTDIR" Name="test" />
</Directory>
</Directory>
<Feature Id="FeatureId" Title="test components">
<ComponentGroupRef Id="TestComponents" />
</Feature>
</Product>
<Fragment>
<ComponentGroup Id="TestComponents" Directory="TSTDIR">
<Component Id="VS_Microsoft.CodeAnalysis.TypeScript.EditorFeatures.dll">
<File Id="Microsoft.VisualStudio.TypeScript.Internal" Source="Microsoft.VisualStudio.TypeScript.Internal.dll" />
</Component>
</ComponentGroup>
</Fragment>
</Wix>
但这导致以下错误:
"Test.wixproj" (default target) (1) -> (Link target) ->
test.wxs(22): error LGHT0231: The component 'VS_Microsoft.CodeAnalysis.TypeScript.EditorFeatures.dll' has a key file with path 'TARGETDIR\\test\\microsoft.visualstudio.typescript.internal.dll'. Since this path is not rooted in one of the standard directories (like ProgramFilesFolder), this component does not fit the criteria for having an automatically generated guid.
(This error may also occur if a path contains a likely standard directory such as nesting a directory with name "Common Files" under ProgramFilesFolder.) [Test.wixproj]
我的问题是我该如何VS2015_ROOT_FOLDER
此错误,因为VS2015_ROOT_FOLDER
植根于Program Files
。
看起来您只需要在TARGETDIR
和VS2015_ROOT_FOLDER
之间添加ProgramFilesFolder
, VS2015_ROOT_FOLDER
此更改。
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="ProgramFilesFolder">
<Directory Id="VS2015_ROOT_FOLDER">
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.