WiX抱怨(赔率对吗?):
错误95组件'blahblah'的密钥文件的路径为'TARGETDIR \ blah.dll'。由于此路径未植于标准目录之一(例如ProgramFilesFolder)中,因此该组件不适合具有自动生成的guid的条件。(如果路径包含可能的标准目录,例如在ProgramFilesFolder下嵌套名称为“ Common Files”的目录,也会发生此错误。)
但是我想要一个自动生成的GUID,并且我不想将TARGETDIR设置为包含ProgramFilesFolder的其他路径,因为我在UI中设置了TARGETDIR甚至允许用户更改它,以便人们可以指定他们要在其上安装应用程序的路径...某人如何获得此功能?可能吗?我的意思是,我可以两全其美吗?为什么这么重要?WiX有时过于严格...
我的第一个问题是,我应该努力让编译器使用自动生成的 guid 吗?
我正在尝试使用 WiX 为网站创建安装程序。请原谅我的无知,这是我的第一个 WiX 项目。我正在关注这篇文章:
http://blog.bartdemeyer.be/2013/10/create-an-installer-for-website-with-wix-part-1/
该过程使用 msbuild 调用多个 WiX 工具以最终创建 MSI。该示例在调用 heat 时使用“Generate guids now”(“-gg”开关):
<Target Name="Harvest">
<!-- Harvest all content of published result -->
<Exec
Command='"$(WiX)bin\heat.exe" dir $(Publish) -dr INSTALLFOLDER -ke -srd -cg MgrWebComponents -var var.publishDir -gg -out $(WebSiteContentCode)'
ContinueOnError="false"
WorkingDirectory="." />
</Target>
Run Code Online (Sandbox Code Playgroud)
我在别处阅读最佳做法是使用自动生成的 guid(-ag 开关)来确保正确安装产品更新。我注意到每次运行加热时 guid 都会发生变化。
<Fragment>
<ComponentGroup Id="MgrWebComponents">
<Component Id="cmp56294569B275493319100C26538BA16C" Directory="INSTALLFOLDER" Guid="{A43DA07B-C4CD-4FE0-AC09-EEA693AB2BA7}">
<File Id="fil93D55732EC03C2B809F21B9423BF5550" KeyPath="yes" Source="$(var.publishDir)\BrandImageService.ashx" />
</Component>
<Component Id="cmp6BD39B2D572EA73C29A81AE5D1C3F0C4" Directory="INSTALLFOLDER" Guid="{99B7B916-AEC0-4EE9-B17F-E7B325E93A4D}">
<File Id="filE861424851E26D456D43F5D1855B3E7B" KeyPath="yes" Source="$(var.publishDir)\Dashboard.aspx" />
</Component>
...
Run Code Online (Sandbox Code Playgroud)
如果我应该使用自动生成的 guid,我需要让编译器正常工作。我在编译时尝试使用自动生成的 guid …