.net - 我怎样才能绕过 "this component does not fit the criteria for having an automatically generated guid"

标签 .net windows wix installation windows-installer

WiX 正在提示(可能性有多大,对吧?):

Error 95 The component 'blahblah' has a key file with path 'TARGETDIR\blah.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.)

但我想要一个自动生成的 GUID,并且我不想将 TARGETDIR 设置为由 ProgramFilesFolder 组成的其他路径,因为我在 UI 中设置了 TARGETDIR,我什至允许用户更改它,以便人们可以指定他们想要安装应用程序的路径...有人如何获得此功能?可能吗?我的意思是,我能否两全其美?为什么这么重要? WiX 有时限制太多...

最佳答案

您需要做的就是设置 Directory/@ComponentGuidGenerationSeed,然后您可以为非标准文件夹使用自动引导。

关于.net - 我怎样才能绕过 "this component does not fit the criteria for having an automatically generated guid",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26019265/

相关文章:

wix - 我如何在 WiX 安装程序脚本中实际使用 LinkerBindInputPaths PropertyGroup

wix - 微星 WIX : Creating minor upgrade patch by using 2 MSI's

c# - StackFrame 的性能如何?

c# - 如何在 Web 浏览器控件中垂直向下滚动

c# - 以编程方式更改 Windows Shell

c++ - Boost 库名称缺少版本标记

c# - 从 C# 列表中获取唯一的 3 位数 zip

.net - 如何注册 System.DirectoryServices 以在 SQL CLR 用户函数中使用?

c - 读取 ntdll.dll + 偏移量会导致访问冲突

wix - WiX 升级后出现发热错误