Importing .NET 2.0 assemblies into Delphi 2006 shows an error message

Posted: (EET/GMT+2)

 

If you are using Delphi to develop .NET applications, you might have needed to add references to new assemblies, even ones you've written yourself. However, Delphi/BDS 2006 isn't very clever when you point it at an assembly that was built for .NET 2.0. (Remember, Delphi 2006 is still only .NET 1.1). In such situations, all you will get is an error such as this:

D:\DLLs\InteropTest.dll is not a valid assembly, type library, or COM object.

Of course, this doesn't help you much, if you want to import such an assembly (DLL or otherwise) into your Delphi project. Even more so because you cannot easily detect against which .NET Framework version an assembly was originally built. Stay tuned for a C# based solution...