<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-gb">
<link rel="self" type="application/atom+xml" href="https://forum.yubico.com/feed.php?f=26&amp;t=1341" />

<title>Yubico Forum</title>
<subtitle>...visit our web-store at</subtitle>
<link href="https://forum.yubico.com/index.php" />
<updated>2014-03-15T00:21:24+01:00</updated>

<author><name><![CDATA[Yubico Forum]]></name></author>
<id>https://forum.yubico.com/feed.php?f=26&amp;t=1341</id>
<entry>
<author><name><![CDATA[Alexander]]></name></author>
<updated>2014-03-15T00:21:24+01:00</updated>
<published>2014-03-15T00:21:24+01:00</published>
<id>https://forum.yubico.com/viewtopic.php?t=1341&amp;p=5052#p5052</id>
<link href="https://forum.yubico.com/viewtopic.php?t=1341&amp;p=5052#p5052"/>
<title type="html"><![CDATA[How to use YubiClientAPI.dll with C# and .NET 3.5]]></title>

<content type="html" xml:base="https://forum.yubico.com/viewtopic.php?t=1341&amp;p=5052#p5052"><![CDATA[
How can I use the YubiClientAPI in a C# / .NET 3.5 application?<br /><br />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.<br />I get the following error with .NET 3.5:<br /><br />A first chance exception of type 'System.BadImageFormatException' occurred<br />An unhandled exception of type 'System.BadImageFormatException' occurred<br />Additional information: Can't load file or assembly Interop.YubiClientAPILib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31a1c8b81d57ef57 or one of its dependencies.<br />This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded.<br /><br />Do I need to create an Interop Assembly?<br />If yes how can I make it compatible with .NET 3.5?<br />Why doesn't Yubico provide the Interop Assembly?<br /><br />I tried to create the Interop Assembly manually with tlbimp but that fails:<br /><br />c:\Tools\Yubico-32bit&gt;tlbimp YubiClientAPI.dll<br />Microsoft (R) .NET Framework Type Library to Assembly Converter 3.5.30729.1<br />Copyright (C) Microsoft Corporation.  All rights reserved.<br /><br />TlbImp : error TI0000 : The input file 'c:\Tools\Yubico-32bit\YubiClientAPI.dll' is not a valid type library.<br /><br />Thanks a lot.<p>Statistics: Posted by <a href="https://forum.yubico.com/memberlist.php?mode=viewprofile&amp;u=2844">Alexander</a> — Sat Mar 15, 2014 12:21 am</p><hr />
]]></content>
</entry>
</feed>