3

I just downloaded the latest version of Math.NET and I'm running into some trouble when I use it.

Could it be that the library was meant to run on a .NET 4.0 project?

Update:

The compiled dlls are within a "Net40" folder, does that mean I cannot reference it in a 2.0 project?

Tried this code and I got an TypeLoadException (VS2008, target framework 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);
        }
    }
}
TylerH
  • 20,799
  • 66
  • 75
  • 101
Jonas
  • 1,365
  • 3
  • 21
  • 39

2 Answers2

4

Update 2013-12-14: Starting from v3, Math.NET Numerics supports .Net 3.5 again as well.

Christoph Rüegg
  • 4,626
  • 1
  • 20
  • 34
1

According to the documentation:

http://www.mathdotnet.com/doc/BuildingMathNet.ashx

Ensure the Microsoft .NET Framework SDK 2.0 or newer is installed.

It requires .NET 2.0

McKay
  • 12,334
  • 7
  • 53
  • 76