How can I use the YubiClientAPI in a C# / .NET 3.5 application?
If I create an Interop Assembly with Visual Studio 2013, It doesn't work with .NET runtime 3.5. It does work with a .NET runtime 4. I get the following error with .NET 3.5:
A first chance exception of type 'System.BadImageFormatException' occurred An unhandled exception of type 'System.BadImageFormatException' occurred Additional information: Can't load file or assembly Interop.YubiClientAPILib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31a1c8b81d57ef57 or one of its dependencies. This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded.
Do I need to create an Interop Assembly? If yes how can I make it compatible with .NET 3.5? Why doesn't Yubico provide the Interop Assembly?
I tried to create the Interop Assembly manually with tlbimp but that fails:
c:\Tools\Yubico-32bit>tlbimp YubiClientAPI.dll Microsoft (R) .NET Framework Type Library to Assembly Converter 3.5.30729.1 Copyright (C) Microsoft Corporation. All rights reserved.
TlbImp : error TI0000 : The input file 'c:\Tools\Yubico-32bit\YubiClientAPI.dll' is not a valid type library.
Thanks a lot.
|