Ich habe einen NUnit-Komponententest, der in eine normale F # -Bibliothek geschrieben wurde, aber auf F # -Code in einer Portable Class Library abzielt.MissingMethodException beim Ausführen eines Komponententests mit FSharp.Data
Wenn ich diesen Test durchgeführt (in Visual Studio 2013), erhalte ich die folgende Ausnahme:
Result Message: System.MissingMethodException : Method not found:
'Microsoft.FSharp.Control.FSharpAsync`1<System.IO.TextReader> FSharp.Data.Runtime.IO.asyncReadTextAtRuntime(System.Boolean, System.String, System.String, System.String, System.String)'.
Dies ist, was ich in meinem app.config in der Portable Klassenbibliothek haben:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="FSharp.Core" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-3.3.1.0" newVersion="3.3.1.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
Dies ist, was ich in der app.config meiner normalen F # -Bibliothek haben:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="FSharp.Core" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.3.1.0" newVersion="4.3.1.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="nunit.framework" publicKeyToken="96d09a1eb7f44a77" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-2.6.3.13283" newVersion="2.6.3.13283" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
Das scheint nicht der Fall zu sein, da die DLL-Datei FSharp.Data im Ausgabeordner genau die gleiche ist wie die, auf die verwiesen wird. Ich werde versuchen, ein anderes PCL-Profil als das zu verwenden, das ich verwendete (neues Profil 7) wird anscheinend nicht empfohlen: https://github.com/fsharp/FSharp.Data/issues/605 –
@ tiago-margalho Awww, Pech Mann. War einen Versuch wert :-( – Scott