.net – 如何解决这个烦人的WiX问题?

前端之家收集整理的这篇文章主要介绍了.net – 如何解决这个烦人的WiX问题?前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
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,然后您可以将auto guids用于非标准文件夹.

猜你在找的Windows相关文章