12/18/03
If you have recently created your own VS.NET add-in, or used someone else's, and
uninstalled it, you may have run into the following error (or one similar)
in VS.NET when trying to add a new object to your application:
Could not run the 'C:\Program Files\Microsoft Visual Studio .NET\VC#\CSharpProjectItem\LocalProjecrtItems\..\CSharpAddWinFormWiz.vsz'
wizard'
The general symptom is: "Could not run the + some .vsz file + wizard." when you
try to add a class, form, or whatever to your VS.NET project.
First of all, if you didn't write the addin, you can't fix the uninstall.
If you did write the add-in, go into the setup project and mark everything as
excluded that might already be on the user's system. In particular,
extensibility.dll and vslangproj.dll. If you're using any of the Office
components (MSO components), such as command bars, you will want to mark those
DLLs as system.
Now, if this has already hosed your system (likely, if you're here), then
you need a fix. The best fix is simply to run the repair for VS.NET by going
to control panel, add/remove programs, and clicking "Change/Remove" for VS.NET
and then choose the Repair option. On my P4 1.7 laptop, this is an all day
affair.
For a quick and dirty fix, you can try the following. This shouldn't cause
any problems, but it may not fix everything, depending on what was in the
setup.
1: Open a command prompt and go to the IDE directory of your VS.NET install.
On my machine it's found here:
C:\Program Files\Microsoft Visual Studio .NET 2003\Common7\IDE
2: Type: regasm extensibility.dll
3: Type: regasm vslangproj.dll
4: Download this file (regtlb.zip) and unzip it to
a location that's in your path. I have a utils directory where I keep a bunch
of command prompt tools.
5: Go to the directory: C:\Program Files\Common Files\Microsoft Shared\MSEnv
6: Type: regtlb vslangproj.tlb
You should be good to go at this point. If you're not, go for the repair
option, and take the rest of the day off.
Now, for the credit where credit is due department. This information was
obtained from the VSNETADDIN
group on Yahoo!
The solution (and the regtlb code) was offered up by Craig Skibo of Microsoft.
The source code for regtlb is here.
As a side note: regtlb is a type library registration program, similar to
regsvr32.exe, except it works on type libraries instead of executeables.
It's possible you're getting this for some reason unrelated to add-ins,
or it's possible that this fix doesn't do it for you. If that's the case,
all I can say is, do the repair and enjoy the rest of your day.