[英]Can I use Math.NET runtimes with a .NET 2.0 or .NET 3.5 application?
I just downloaded the latest version of Math.NET and I'm running into some trouble when I use it. 我刚刚下载了最新版本的Math.NET,当我使用它时遇到了一些麻烦。
Could it be that the library was meant to run on a .NET 4.0 project? 是不是该库本来是在.NET 4.0项目上运行的?
Update: 更新:
The compiled dlls are within a "Net40" folder, does that mean I cannot reference it in a 2.0 project? 编译的dll在“Net40”文件夹中,这是否意味着我无法在2.0项目中引用它?
Tried this code and I got an TypeLoadException
(VS2008, target framework 3.5) 尝试了这段代码,我得到了一个
TypeLoadException
(VS2008,目标框架3.5)
using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;
using MathNet.Numerics.LinearAlgebra.Double;
namespace MathNetTest
{
static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{
double[,] A = new double[3, 3];
A[0, 0] = 1;
A[0, 1] = 0.2;
A[0, 2] = 1;
A[1, 0] = 1.5;
A[1, 1] = -1.2;
A[1, 2] = 1.1;
A[2, 0] = 0.45;
A[2, 1] = 2.1;
A[2, 2] = -0.76;
Matrix XA = new DenseMatrix(A);
Matrix XB = new DenseMatrix(A);
Matrix C = (Matrix)(XA * XB);
}
}
}
Update 2013-12-14: Starting from v3, Math.NET Numerics supports .Net 3.5 again as well. 更新2013-12-14:从v3开始,Math.NET Numerics也支持.Net 3.5。
According to the documentation: 根据文件:
http://www.mathdotnet.com/doc/BuildingMathNet.ashx http://www.mathdotnet.com/doc/BuildingMathNet.ashx
Ensure the Microsoft .NET Framework SDK 2.0 or newer is installed.
It requires .NET 2.0 它需要.NET 2.0
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.