Com Interop error

G

Guest

After working fine for months, today, when I ran my project I received the message:

"COM Interop registration failed. Could not find a type library for assembly 'Microsoft.VisualBasic'."

I chose to continue and the code ran as normal; however, I cannot build the release version of the project.

Naturally, I don't recall doing anything that would have caused this. How can I recover? Has a reference become corrupt?
 
P

Peter Huang

Hi Steve,

Did the problem occurred in the compile time or runtime?

You may try to follow the steps below to see if the problem persists.

1. Open Visual Studio .Net command prompt
2. Navigate to .Net framework directory
WindowsDirectory\Microsoft.NET\Framework\v1.1.4322 (If you are running .net
framework 1.1 otherwise use 1.0)
3. Run following command to register Microsoft.VisualBasic.dll assembly
with COM:
regasm Microsoft.VisualBasic.dll /codebase /tlb
4. Rebuild your solution Please let me know whether that works for you.


Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
 
G

Guest

"Peter Huang" said:
Hi Steve,

Did the problem occurred in the compile time or runtime?

You may try to follow the steps below to see if the problem persists.

1. Open Visual Studio .Net command prompt
2. Navigate to .Net framework directory
WindowsDirectory\Microsoft.NET\Framework\v1.1.4322 (If you are running .net
framework 1.1 otherwise use 1.0)
3. Run following command to register Microsoft.VisualBasic.dll assembly
with COM:
regasm Microsoft.VisualBasic.dll /codebase /tlb
4. Rebuild your solution Please let me know whether that works for you.


Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.

Peter,

I was not familiar with the .Net command prompt environment so I did what you suggested through the W2k command prompt window. I received the following message:

..IVbHost.GetParentWindow(#0), Microsoft.VisualBasic'. Warning: Type library exp
orter could not find the type library for System.Windows.Forms.IWin32Window. IU
nknown was substituted for the interface.

and the message that the type library was registered successfully.


AND......the problem is now resolved. However, should I be concerned about the message above?
 
P

Peter Huang

Hi Steve,

Did my reply help you?
If you still have any concern, please feel free to post here.

Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top