首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >如何使用VS2015_ROOT_FOLDER在WiX3.10中设置安装位置

如何使用VS2015_ROOT_FOLDER在WiX3.10中设置安装位置
EN

Stack Overflow用户
提问于 2015-09-10 21:52:14
回答 1查看 130关注 0票数 0

使用Wix3.10,我试图在公共扩展文件夹中安装一个扩展。但是,我还没有弄清楚如何使用VS2015_ROOT_FOLDER属性。

Product元素中有以下内容:

代码语言:javascript
复制
<?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的。

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2015-09-12 00:10:05

看起来,您只需要在ProgramFilesFolderTARGETDIR之间添加这个更改就可以了。

代码语言:javascript
复制
<Directory Id="TARGETDIR" Name="SourceDir">
  <Directory Id="ProgramFilesFolder">
    <Directory Id="VS2015_ROOT_FOLDER">
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/32512236

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档