我正在使用visual studio express 2013 for windows在windows app中实现liblinear。在使用nuget包管理器安装liblinear之后(链接为https://www.nuget.org/packages/Liblinear/)我试图使用它:
using de.bwaldvogel.liblinear;
在我输入的代码中:
Parameter para = new Parameter(SolverType.MCSVM_CS, 1.0 , 0.01);
但它在运行时出错,说明:
An exception of type 'System.TypeLoadException'occured in FileExplorer.DLL but was not
handled in the user code.
Additional Information: Could not load type 'System.Runtime.Serialization.Iserializable
' from assembly 'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e'.
If there is a handler for this exception, the program may be safely continued.
当安装nuget包时,没有错误,但有警告声明
Reference to type 'System.Runtime.Serialization.ISerializable' claims it is defined in
'c:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\WindowsPhone\v8.0\mscorlib.dll',
but it could not be found (in IKVM.OpenJDK.Core.dll)
Reference to type 'System.Runtime.Serialization.SerializationInfo' claims it is defined
in 'c:\Program Files (x86)\ReferenceAssemblies\Microsoft\Framework\WindowsPhone\v8.0
\mscorlib.dll', but it could not be found (in IKVM.OpenJDK.Core.dll)
有人可以帮我解决这个问题吗?我正在为Windows Phone 8.0开发应用程序。
答案 0 :(得分:0)
不幸的是,ISerializable接口不适用于Windows Phone 8.x. :(查看平台部分here。This thread还有其他信息。
是否应该在Windows Phone上支持liblinear NuGet包?如果是这样,我会直接与包裹的作者联系。