2015-09-10 3 views
0

Используя Wix 3.10, я пытаюсь установить расширение в общую папку расширений. Однако мне не удалось выяснить, как использовать свойство VS2015_ROOT_FOLDER.Как использовать VS2015_ROOT_FOLDER для установки места установки в Wix 3.10

У меня есть следующие внутри 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]

Мой вопрос, как я suppres эту ошибку, так как VS2015_ROOT_FOLDER является корень под Program Files.

ответ

0

Ну, похоже, вам просто нужно добавить ProgramFilesFolder между TARGETDIR и VS2015_ROOT_FOLDER Это изменение, чтобы сделать эту работу.

<Directory Id="TARGETDIR" Name="SourceDir"> 
    <Directory Id="ProgramFilesFolder"> 
    <Directory Id="VS2015_ROOT_FOLDER"> 
Смежные вопросы