gpt4 book ai didi

.net - 注销旧版本的 .net 程序集

转载 作者:行者123 更新时间:2023-12-04 15:37:26 25 4
gpt4 key购买 nike

我有一个有很多旧注册版本的程序集。

我唯一的dll是最后一个。

如何取消注册程序集的所有版本?

谢谢。

编辑:我想在运行时执行此操作,所以我想要 regasm -u... 或其他一些脚本解决方案。

最佳答案

编辑:我假设您尝试删除关联的注册表项。

Regasm 可以输出一个 .reg 文件。

You can use the /regfile option to generate a .reg file that contains the registry entries instead of making the changes directly to the registry. You can update the registry on a computer by importing the .reg file with the Registry Editor tool (Regedit.exe).



如果要在运行时卸载旧版本,大概可以:

1)为当前程序集创建一个reg文件(供引用)。

2) 编写一个应用程序来检查注册表中是否有类似的键(可能具有不同的版本号?)

3) 使用 regasm 取消注册匹配的程序集。如有必要,请使用 regsvr32 卸载 COM 实体。

4) 小心地以编程方式删除这些键。

5) 注册您的新程序集。

6) gacutil 新注册的程序集(如果需要)。

我的 COM/Interop 有点生疏,所以如果这不起作用,请发表评论。

关于.net - 注销旧版本的 .net 程序集,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3899557/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com