Wix 中的组件 GUID
我有一个 .net dll,由我的 2 个应用程序(客户端和服务器)共享。
我不知道文件将安装在哪里,因为用户选择安装,他可能只安装客户端或同时安装客户端和服务器。
我在服务器和客户端 wix 上都有组件,它只包含共享程序集。
我应该为它们提供相同的 GUID 吗?在同一路径上安装服务器和客户端是否会对安装产生任何影响?服务器和客户端可能需要不同的程序集版本,但文件名相同。
I have a .net dll that is shared by 2 applications of mine, client and the server.
I do not know where the files will be installed as user chooses the install and he may only install client or both client and server.
I have component on both server and client wix and it contains only the shared assembly.
Should I have same GUID for both of them? Does installing both server and client on the same path impact the install in any way? Server and Client may want different assembly versions but filename would be same.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
好吧,如果服务器和客户端想要两个不同的程序集版本,那么您将必须有两个不同的 DLL,因此,您将需要两个不同的 GUID(不确定为什么需要不同的程序集)。
但如果情况并非如此,您仍然可以确定 DLL 的位置(即使用户安装到其他位置)。例如,您始终可以将 DLL 放在预定位置(例如 system32 文件夹),然后无论他们在何处进行其余安装,都可以保证将其放在那里。或者,您可以设置一个指向 DLL 位置的环境变量。
我会推荐第二种方法,并且仅使用一个 GUID。似乎没有令人信服的理由需要两个单独的 DLL。
Well, if the server and client would want two different assembly versions, then you'll have to have two different DLL's and, hence, you'll need two different GUIDs (not sure why you would need a different assembly).
If that is not the case, though, you can still determine the location of the DLL (even if the user installs to another location). For example, you could always put the DLL in a predetermined location (the system32 folder for example) and you'll then be guaranteed to have it there no matter where they do the rest of the install. Or, you could set an environment variable which points to the location of the DLL.
I would recommend the second approach and use only one GUID. It doesn't seem like there is a compelling reason for two separate DLLs.