使用Wix3.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是根植于Program Files的。
发布于 2015-09-12 00:10:05
看起来,您只需要在ProgramFilesFolder和TARGETDIR之间添加这个更改就可以了。
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="ProgramFilesFolder">
<Directory Id="VS2015_ROOT_FOLDER">https://stackoverflow.com/questions/32512236
复制相似问题