Yubico Forum https://forum.yubico.com/ |
|
How to use YubiClientAPI.dll with C# and .NET 3.5 https://forum.yubico.com/viewtopic.php?f=26&t=1341 |
Page 1 of 1 |
Author: | Alexander [ Sat Mar 15, 2014 12:21 am ] |
Post subject: | How to use YubiClientAPI.dll with C# and .NET 3.5 |
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. |
Page 1 of 1 | All times are UTC + 1 hour |
Powered by phpBB® Forum Software © phpBB Group https://www.phpbb.com/ |