Wednesday, March 30, 2005

VS.NET wizards and "Library not registered"

I have had an annoying problem with VS.NET 2003 for several months now, after uninstalling some trial add-ins for Office. The problem is that all of the C# 'add new' wizards in VS.NET would fail with "library not registered", e.g. I could not add a new project, a new class, etc. So I have had to copy and modify existing files to be able to add new stuff to my solutions.

After a lot of googling, I tried all of the solutions suggested on the 'net:

  • registering the C++ COM component \Vc7\vcpackages\csproj.dll
  • registering all the COM components in \Microsoft Visual Studio .NET 2003\ including all sub directories
  • repairing VS.NET
  • uninstalling VS.NET, reboot, installing VS.NET, reboot
...but none of these actions helped me. The first action is what fixes this problem in most cases.

When the problem was not fixed even after a complete reinstall of VS.NET, I finally tried installing Windows Script 5.6, even if I thought that it seemed like a far shot. And know what; it actually fixed the problem! After several hours of grief, I am now able to create a new Infopath project in VS.NET.

3 comments:

Unknown said...

Hi,
Thanks for the help. I tried registering the DLLs and still had some problems. Here is how I fixed it.
I used a tool called Regmon and ran it while VS threw the error.
I found I did not have access to a key.
devenv.exe:160 OpenKey HKCR\TypeLib\{420B2830-E718-11CF-893D-00A0C9054228} ACCESS DENIED Access: 0x2000000 BGTDOM\dokeeffe

I tried to manually delete this key and import it from a working machine. However I could not import it as I could not delete the existing key. I found the key had no owner. I used regedit to find the key, right click on it then permissions. Then advanced then the owner tab. There was no owner. I added Administrators as the owner. Then I could add myself to the list of users with permissions and gave myself full permissions. Then I did this for all children of this key and eventually managed to import the key from the other machine.
Then reboot and hey-presto. I can create a project with no errors.

I'm just starting out in dot net development coming from Java and this is crazy stuff if you ask me but I hope someone finds this helpfull.

Derek

Blog do Guilherme said...

a simple C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\vcpackages>regsvr32 cspro
j.dll has solved my problem, thank very much :D

Anonymous said...

I got the same problem. And yeah, it was solve by registering cproj.dll. On the RUn command type regsvr32 "C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\vcpackages\csproj.dll"
Thanks Araujo.