- How to fix the error when compiling COM: TlbImp : error TI0000: Encountered multiple versions of the assembly with GUID ‘…’. Try pre-importing one of these assemblies ?
This could be fixed in few ways:
(1) Compile with a higher .NET framework
(2) Since this error occurs when using the same GUID in the AssebmlyInfo.cs, i.e:
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("...")]
Open your AssebmlyInfo.cs and locate the lines above, then generate new GUID (could be done here: https://www.guidgenerator.com/online-guid-generator.aspx). and replace your current GUID (which Encountered multiple times) with the new GUID you just created (do it for all of the GUID which appear in the error message)
This should solve the problem 🙂