如何使用Harvest Project和VS2015将文件关联添加到Wix项目?

时间:2016-07-14 11:53:47

标签: visual-studio-2015 wix

我似乎无法找到谷歌的任何答案,所以是时候问这个......

我有一个自定义应用程序的应用程序,Silver Monkey,mmoRPG Furcadia的Bot。几个月前我刚刚开始使用Wix,所以我还在学习这个版本。我的项目编译得很好但是当我在我的Product.wxs文件中添加文件关联代码时,我得到了错误。

守则是 好的,我已经更新了代码段

</Component> <Component Id="SilverMonkeyExt" Guid="{DEC333A0-7393-4097-AB77-A2847D121A3C}"> <File Id="SilverMonkey" Source="$(var.SilverMonkey2.TargetDir)SilverMonkey.exe" KeyPath="no" Checksum="yes" /> <ProgId Id='SilverMonkeys' Description='Bot information File' > <Extension Id='bini' ContentType='application/BotInformationFile'> <Verb Id='open' Command='Open' TargetFile='SilverMonkey' Argument='"%1"' /> </Extension> </ProgId> </Component>

现在我收到了错误 无法比较数组中的两个元素。设置light.exe 可能与Harvest项目发生冲突吗?我正在使用刚刚在7月发布的w 4.0

1 个答案:

答案 0 :(得分:0)

我找到了解决方案here

我发现我可以使用SetProperty 像

 <SetProperty Id='FileAssociationProperty'
Value="[APPLICATIONFOLDER]\SilverMonkey.exe" After="CostFinalize"/>

然后我可以在动词

中使用它与Target属性
<ProgId Id="SilverMonkey.exe"  Description="Silver Monkey File type" Advertise="no" >
  <Extension Id="bini"  ContentType="Text/Plain" Advertise="no" >
    <Verb Command="Open" Id="open" TargetProperty="FileAssociationProperty"
    Argument="%1" />
  </Extension>
</ProgId>

它可以使用XSLT文件转换输出,但是现在对我来说太过于难以学习

相关问题