Home Dashboard Directory Help

TlbImp: Encountered multiple versions of the assembly with GUID '000204ef-0000-0000-c000-000000000046' by sandilar


 as Fixed Help for as Fixed

Sign in
to vote
Type: Bug
ID: 565978
Opened: 6/8/2010 8:28:56 PM
Access Restriction: Public
User(s) can reproduce this bug


I have a project that I have converted from 2010 to 2008. The project has a reference to an COM component written in vb6.

In 2010 when building the project I get the following error:

TlbImp: Encountered multiple versions of the assembly with GUID '000204ef-0000-0000-c000-000000000046'. Try pre-importing one of these assemblies.

This did not happen in VS2008.

You can reproduce by creating a vb6 activex dll with a single public class with the following methods.

Public Function Test1() As Collection
    Set Test1 = New Collection
End Function

Public Function Test2() As ColorConstants
    Test2 = vbBlack
End Function

You get the above error when you try to add a reference to the dll in VS2010.

Sign in to post a comment.
Posted by jk- on 7/25/2012 at 2:25 AM
What I'm not quite clear on is if this actually causes a problem? what are the effects of this other than the diagnostic message - all my projects seem to actually build and run ok? i.e. is it worth us using the workaround or simply ignoring the warning?
Posted by Paul_ibis on 1/11/2012 at 5:41 PM
We are also getting this error. I am running vs 2010 Sp1 and have applied the hotfix that is detailed in kb 2066987 as I was getting the error detailed there. Still getting the error described by others here (and the original error described in 2066987 when trying to add the COM object to a form).
I have had to revert back to 2008 which is very frustrating.
Posted by Mickaël MOTTET on 1/4/2012 at 5:58 AM
Please give us a hotfix! We have the problem on many projects.
Posted by RoyElRayes on 12/9/2011 at 9:39 AM
Has there been a hotfix released for this?
Posted by GianlucaFromItaly on 11/21/2011 at 1:04 AM
I'm getting this error migrating my solution from VS2005 to VS2010. I'm referencing COM components that are vital for my software and I can't make changes to them, so this Bug fix is very necessary for me, is it possible to know the release date?

Thank you
Posted by madhur on 8/22/2011 at 1:38 AM
When I'm trying to generate interops using Fx 4.0 then the projects which are using these interops throwing this error. First warnings of following types
TlbImp : warning TI0000: Type library importer has encountered an interface not derived from IUnknown: '_HiddenInterface'. <proj Name>
then error
TlbImp : error TI0000: Encountered multiple versions of the assembly with GUID '000204ef-0000-0000-c000-000000000046'. Try pre-importing one of these assemblies. <proj Name>
Is there any hotfix came for this or I need to wait till SP2?
Posted by Luc Morin on 6/27/2011 at 11:25 AM
Can't Microsoft provide us with a hotfix for this ?

This bug is keeping us from migrating our main product to VS2010.

Thank you
Posted by Microsoft on 3/21/2011 at 9:47 AM
This was fixed and should be available in a future release of Visual Studio.

(Note: This did not make it into SP1.)

Thanks for helping out!
Posted by Luc Morin on 12/20/2010 at 8:29 AM
Could we have some feedback from Microsoft's representatives on the release date of a fix for this bug ?

It doesn't seem to have been fixed in SP1 Beta as per user feedback below.

We want to switch to VS2010, but this is keeping us from upgrading.
Posted by IgorT75 on 12/14/2010 at 2:52 AM
Was this issue fixed with Visual Studio 2010 SP1 Beta just released?
Where one can see exact fixes/improves list related to this SP?
Posted by rwj_defcon1 on 12/10/2010 at 9:16 AM
Can create this problem as well. It seems to only happen if projects are nested and workaround to it is delete all bin and obj folder in solution (then you can rebuild once). Just tested it on VS2010 SP1 Beta1 and error still persist :-(
Posted by JeffZ on 12/3/2010 at 9:48 AM
In addition to running into this issue during our MSBuild process, we see the issue during development when compiling our solutions within Visual Studio 2010.

As a side note, our COM references are isolated and registered in-place.

Is there an ETA on the resolution of this issue, as it is a significant roadblock to our group migrating to Visual Studio 2010?
Posted by Inside686 on 11/3/2010 at 8:03 AM
We are experiencing the same issue after updating our solutions from VS2008 to VS2010.
Note that it is only happening when compiling the solution from outside Visual Studio (calling MSBuild.exe from Nant).
Has a workaround or a solution been found ? It is a blocking issue forcing us reverting everything to VS2008.
Posted by Neerajb on 9/30/2010 at 12:30 AM
I am getting below error while building a project.
Same code is working fine on other PC but on my PC it gives below:-
"Encountered multiple versions of the assembly with GUID 'e727f9a9-a4ae-4e7b-96e3-b38a97f2ff6f'. Try pre-importing one of these assemblies."

Above error came after conversion of project 2005 to 2010
I want know why it works fine on one pc and other it is giving error.
Kindly provide exact steps to remove above error.

Posted by Microsoft on 8/13/2010 at 1:10 PM
ResolveComReference prints out the TLBImp command lines that it runs when it runs them. E.g.

D:\Program Files\Microsoft SDKs\Windows\v7.0A\bin\TlbImp.exe C:\MACHINE\MSVBVM60.DLL /namespace:VBRUN ...

If you wanted to replace the typelib number, you'd need to remove that COM reference from your project as a COM reference, add a target that executes the TLBImp command line with the appropriate typelib number (found via looking in the registry for the guid as described earlier), and add a reference to the output interop assembly. E.g.

<Target Name="ResolveBrokenComReferences" AfterTargets="ResolveComReferences" BeforeTargets="ResolveAssemblyReferences">
<Exec Command="\"D:\Program Files\Microsoft SDKs\Windows\v7.0A\bin\TlbImp.exe\" C:\MACHINE\MSVBVM60.DLL\3 /namespace:VBRUN /out:obj\Debug\Interop.VBRUN.dll ..." />

and replace

<COMReference Include="VBRUN">


<Reference Include="obj\Debug\Interop.VBRUN.dll" />

Hope that helps!

Sara Joiner
Developer, MSBuild
Posted by TonysSearch on 8/12/2010 at 3:19 PM
Currently, moving from vs2005 to vs2010. I am having the same issue with several custom c++ com dlls as well as a foxitreader.ocx reference.

please elaborate on: "could also be fixed by putting a missing typelib number back in. "

Posted by Microsoft on 8/10/2010 at 9:57 AM
If you increase the MSBuild build log verbosity to detailed (either through Tools -> Options -> Projects and Solutions -> Build and Run -> "MSBuild project build output verbosity" in the IDE, or passing '/v:d' (console log) or '/flp:v=d' (log file named msbuild.log) on the command line) and take a look at the "ResolveComReference" task, it should log something about each assembly it resolves including dependencies, either via the guid:

Resolving COM reference dependency "ea544a21-c82d-11d1-a3e4-00a0c90aea82" version 6.0.
Resolved COM reference dependency "ea544a21-c82d-11d1-a3e4-00a0c90aea82" version 6.0: "obj\Debug\Interop.VBRUN.dll"

or via a TlbImp.exe command line:
D:\Program Files\Microsoft SDKs\Windows\v7.0A\bin\TlbImp.exe C:\MACHINE\MSVBVM60.DLL /namespace:VBA ...

You can also look in your project file for the list of <ComReference> items that are primary references:
<COMReference Include="VBA">

If there are two TlbImp command lines with the same input TLB (in the example above, MSVBVM60.DLL) but different requested namespaces, or if you look the guids up in the registry (Where the guid is a key under a path such as HKLM\SOFTWARE\Microsoft\Classes\TypeLib or HKCR\TypeLib) and find that one or more of the guids maps to the same TLB path (which can be found in the default value of the "win32" subkey, which is typically several levels deep), but with different typelib number values, then that's a good sign that this is your problem.

Sara Joiner
Developer, MSBuild
Posted by Patrick Linskey on 8/9/2010 at 7:47 PM
Do you have any suggestions about how to debug this issue for assemblies other than the ActiveX DLL mentioned in the thread? I'm seeing this error with the following GUID: b1bfb649-5236-4628-807c-ff0ac89d4c2f
Posted by Microsoft on 8/4/2010 at 4:17 PM
Thanks for the report! Using the VB6 ActiveX DLL that you attached, I was able to reproduce the issue.

This error occurs when TLBImp tries to load different versions of the same assembly at the same time and, in this case, is caused by a bug in the MSBuild ResolveComReference task, where we erroneously strip the typelib numbers from the typelibs we're generating interop assemblies for before passing them to TLBImp.exe. For example, in the case of your VB6 DLL, it depended on both the 'VBA' namespace ('C:\Windows\System32\MSVBVM60.dll') and the 'VBRUN' namespace ('C:\Windows\System32\MSVBVM60.dll\3'), so when we went to generate the interop assembly for your typelib, this error occurred due to improper generation of the two dependent interop assemblies.

That particular issue should be fixed for a future version of Visual Studio. However, given the number of reports of this problem, I'd appreciate it if any of you others who are encountering similar issues could check to see if your problem could also be fixed by putting a missing typelib number back in. If not, please let us know.

Sara Joiner
Developer, MSBuild
Posted by Littlebluedevil on 6/30/2010 at 6:58 PM
I received this error when converting a 2008 website to 2010 web application

Error    1    Encountered multiple versions of the assembly with GUID '7db1cce1-1d93-11d5-aaec-cd97f8f24260'. Try pre-importing one of these assemblies.    D:\DevProjects\~\WebApplication\TlbImp    WebApplication
Posted by Stan Dvoychenko on 6/25/2010 at 1:05 AM
Sorry should have written "and added reference to its output ..."
Posted by Stan Dvoychenko on 6/25/2010 at 1:03 AM
I have just used tlbimp on the dll in question and added reference to it instead of original dll. Project compiles now. Can it be confirmed that it is a valid workaround until there is some fix for it?
Posted by Nahidupa on 6/22/2010 at 3:56 AM
we are also facing this issue while converting from vs 2008 to 2010.
Error    2    Encountered multiple versions of the assembly with GUID '435635-345345-3453-345-345'. Try pre-importing one of these assemblies.    ....\TlbImp
Posted by sandilar on 6/21/2010 at 9:31 AM
Any update on this issue. This getting to be major issue for my current project and need a fix or workaround.
Posted by Rick Webster on 6/17/2010 at 8:20 AM
I am also experiencing this problem. I just converted one of our applications from Visual Studio 2008 to 2010. It build fine with 2008 but with 2010 I get:

Encountered multiple versions of the assembly with GUID '9ddfe861-87fd-4ca4-8849-878306b7e6c8'. Try pre-importing one of these assemblies.

What does pre-importing mean?
Posted by Tournesol on 6/10/2010 at 10:50 AM
Actually, I am encountering a very similar issue. I am converting a C# 2008 solution to 2010 and receveid exactly the same error:
Error    2    Encountered multiple versions of the assembly with GUID '2df8d04c-5bfa-101b-bde5-00aa0044de52'. Try pre-importing one of these assemblies.    C:\Code\FCRL\Website\FCRL\FCRL.Test\TlbImp    FCRL.Test

The solution compiles fine - I only encounter this error when I attempt to run it.

I went to the FCRL.Test project, noticed a broken reference to Excel and removed it. I recompiled the solution, tried running it again and now it works.
Posted by sandilar on 6/9/2010 at 5:52 AM
File attached.
Posted by Microsoft on 6/9/2010 at 1:35 AM
Thank you for reporting this issue.
Could you please attach the vb6 ActiveX dll to us?
Posted by Microsoft on 6/9/2010 at 1:33 AM
Thank you for your feedback. We are currently reviewing the issue you have submitted. If this issue is urgent, please contact support directly(http://support.microsoft.com).
Sign in to post a workaround.
File Name Submitted By Submitted On File Size  
TestVS2010Error.dll 6/9/2010 20 KB