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:\Windows\Microsoft.NET\Framework\v4.0.30319
.
Below is a screenshot of my Windows 7 partition, with .Net 4.0 (and regtlibv12):
Below is Windows 8 with .Net 4.5 (and no 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?
Thanks
So, you have to use regtlibv12.exe You can find this file in C:\Windows\Microsoft.NET\Framework\v4.
A type library (. tlb) is a binary file that stores information about a COM or DCOM object's properties and methods in a form that is accessible to other applications at runtime. Using a type library, an application or browser can determine which interfaces an object supports, and invoke an object's interface methods.
The correct registration entries for a type library can be generated by calling the RegisterTypeLib function on the type library. You can then use Regedit.exe to write the registration entries to a text file from the system registration database.
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.
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.
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:
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.
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.
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.
Refer to Hans' excellent answer to the question as posed; this answer explains how to get hold of the aforementioned executable.
(Or you can use chocolatey to install both of the above: package names are 7zip
and lessmsi
respectively.)
dotNetFx40_Full_x86_x64.exe
from the previous step, extract the files netfx_Core_x64.msi
and netFxCore.mzz
to a temporary directorynetfx_Core_x64.msi
, scroll down the file list and select regtlibv12.exe
(the one with Component = regtlibv12_exe_amd64
for an x64 system, the other one for x86, or both if you need both) and click the "Extract" buttonregtlibv12.exe
!regtlibv12.exe
(regardless of the fact that doing so would be illegal, if you think you need to - you either don't, or your software has big problems).If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With