regtlibv12 发生了什么? [英] What happened to regtlibv12?

查看:34
本文介绍了regtlibv12 发生了什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在分区上全新安装了 Windows 8,安装了 Visual Studio 11/2012 Professional,但在 C:WindowsMicrosoft.NET 中找不到 regtlibv12.exe框架v4.0.30319.

I have a clean install of Windows 8 on a partition, with Visual Studio 11/2012 Professional installed and I cannot find regtlibv12.exe inside C:WindowsMicrosoft.NETFrameworkv4.0.30319.

下面是我的 Windows 7 分区的屏幕截图,使用 .Net 4.0(和 regtlibv12):

Below is a screenshot of my Windows 7 partition, with .Net 4.0 (and regtlibv12):

下面是带有 .Net 4.5 的 Windows 8(没有 regtlibv12):

Below is Windows 8 with .Net 4.5 (and no regtlibv12):

regtlibv12 不再是 .Net 框架的一部分了吗?我还需要安装 .Net 4.0 吗?如果我在 4.5 之上安装 .Net 4.0 会发生什么?我知道它们都在硬盘驱动器上的同一位置,4.5 有效地覆盖了 4.0,而 4.5 在 Windows 8 上是默认设置.我是否需要安装 4.0,然后重新安装 4.5 以获得 regtlibv12 回来?

Is regtlibv12 no longer a part of the .Net framework? Do I need to install .Net 4.0 as well? What would happen if I installed .Net 4.0 over the top of 4.5? I know that they both go to the same location on the hard drive, and 4.5 effectively overwrites 4.0, and 4.5 comes as default on Windows 8. Would I need to install 4.0, and then re-install 4.5 to get regtlibv12 back?

谢谢

推荐答案

它从来都不是框架的一部分.而且它完全没有记录.然而,有一个非常一致的谣言,很多程序员在他们的 v2.0.50727 或 v4.0.30319 目录中找到了它,并发现它可以解决注册问题.很多论坛帖子都提到了它.

It was never part of the framework. And it is entirely undocumented. There is however a very consistent rumor that it is, lots of programmers have found it in their v2.0.50727 or v4.0.30319 directories and figured out that it could solve registration problems. Lots of forum posts mention it.

它在这些文件夹中显示的确切方式很难逆向工程,我看到的唯一模式是当您自己安装框架时它就会出现在那里.并且在机器上预装框架时不会出现.这有点道理,框架目录中有几个 .tlb 文件需要注册.它们包含客户端代码可能依赖的 .NET [ComVisible] 类型的类型信息.注册类型库的正常方式不适用于那些 .tlb 文件,因为它们未嵌入到常规 COM 服务器中.额外猜测在 .NET 的预安装版本中不需要该工具,因为注册信息已汇总到常规 Windows 设置中.

The exact way it shows up in those folders is hard to reverse-engineer, the only pattern I've seen is that it will be there when you install the framework yourself. And won't be there when the framework is pre-installed on the machine. Which somewhat makes sense, there are several .tlb files in the framework directory that need to be registered. They contain type info for .NET [ComVisible] types that client code may have a dependency on. The normal way type libraries get registered does not apply for those .tlb files since they are not embedded in a regular COM server. With the additional guess that the tool isn't needed in a pre-installed version of .NET because the registration info is rolled-up into the regular Windows setup.

如果您已经依赖于该工具,那么除了从另一台机器复制 .exe 之外,您无能为力.或者解决您需要从另一端使用它的原因,这样您就不再需要它了:

If you've gotten yourself into a dependency on the tool then you can't do much beyond copying the .exe from another machine. Or tackle the reason you need to use it from the other end so you don't need it anymore:

  • 这是忘记在 Regasm.exe 中使用/tlb 选项的一种解决方法.当客户端代码尝试使用来自另一个线程的 COM 接口时,这可能会在运行时产生 TYPE_E_CANTLOADLIBRARY 错误.类型库提供标准编组器需要编组方法参数的类型信息.使用/tlb 选项来解决这个问题.

  • it is a workaround for forgetting to use the /tlb option with Regasm.exe. That may produce a TYPE_E_CANTLOADLIBRARY error at runtime when client code tries to use a COM interface from another thread. The type library provides the type info that the standard marshaller needs to marshal the arguments of the method. Use the /tlb option to fix that.

这是一种让 COM 服务器显示在项目 + 添加引用"、COM"选项卡中的解决方法.该选项卡列出了已注册的类型库.然而,这不是一个适当的解决方法,除了在构建服务器上,您可以编译代码但由于注册未完成而无法运行它.正确的方法是使用作者提供的安装程序或在紧要关头使用 Regsvr32.exe 以便注册类型库和 CLSID 键.

it is a workaround for getting COM servers to show up in the Project + Add Reference, COM tab. That tab lists registered type libraries. It is however not a proper workaround, other than on build servers, you can compile your code but you can't run it since the registration is not complete. The proper way to do it is by using the author's provided installer or by using Regsvr32.exe in a pinch so both the type library and the CLSID keys get registered.

这是不注册其类型库的 COM 服务器的一种解决方法.与上面类似,但注册类型库是可选的,通常只需要在您的开发机器上,而不是在运行服务器的机器上.大多数可以使用类型库的工具都有一种方法可以显式地添加它们,而不是依赖于 TypeLib 注册表项.Visual Studio IDE 也是如此,您可以使用浏览"选项卡直接选择 .tlb 文件.

it is a workaround for COM servers that don't register their type library. Similar as above, but registering type libraries is optional and typically only required on your dev machine, not on the machine that runs the server. Most tools that can consume type libraries have a way to add them explicitly rather than depend on the TypeLib registry key. So does the Visual Studio IDE, you can use the Browse tab instead to select the .tlb file directly.

这篇关于regtlibv12 发生了什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆