This project has moved and is read-only. For the latest updates, please go here.

Version Conflict using MatrixReader

Jun 2, 2014 at 12:23 AM
I am using the 3.0.0 beta02 version of Numerics in Visual Studio.
 Public Sub ConsolidateByLead(ByVal OpenPath As String,
                             ByVal SavePath As String)
    Dim reader As New Data.Matlab.MatlabMatrixReader(Of Double)(OpenPath & "1")
    Dim FirstMatrix As DenseMatrix = reader.ReadMatrix

End Sub
Debugger gives the following error:
Error 1 The project currently contains references to more than one version of MathNet.Numerics, a direct reference to version and an indirect reference (through 'MathNet.Numerics.Data.Matlab.MatlabMatrixReader.ReadMatrix') to version Change the direct reference to use version (or higher) of MathNet.Numerics. C:\Users\Vardavis\Documents\Visual Studio 2013\Projects\DeNoisingAutoEncoder\DeNoisingAutoEncoder\DataFormatting.vb 12 42 DeNoisingAutoEncoder

I am not sure how to correct this?
Jun 2, 2014 at 12:41 AM
This was not a problem in my last project which was using 3.0.0 beta01.
Jun 2, 2014 at 9:18 PM
Edited Jun 2, 2014 at 9:20 PM
Weird, that combination works well on my system (MathNet.Numerics-3.0.0-beta02 with MathNet.Numerics.Data.Matlab-3.0.0-beta01).

Are you by chance using signed (strong named) assemblies?
Jun 2, 2014 at 9:34 PM

No I'm not using the signed version. I set up this second project using the NuGet manager in Visual Studio.
I installed the latest version of Numerics, the latest versions of Data.text and Data.matlab, and MLK-64bit for windows.

Jun 2, 2014 at 9:57 PM
Edited Jun 2, 2014 at 9:58 PM
Actually not the data.text.
Here is my package.config:
  <?xml version="1.0" encoding="utf-8"?>
 <package id="MathNet.Numerics" version="3.0.0-beta02" targetFramework="net45" />
 <package id="MathNet.Numerics.Data.Matlab" version="3.0.0-beta01" targetFramework="net45" />
 <package id="MathNet.Numerics.MKL.Win-x64" version="1.4.0" targetFramework="net45" />
Jun 15, 2014 at 3:53 PM
It seems there was indeed some issue, maybe caused by the assembly version of v3.0.0-beta02 being lower than that of v3.0.0-beta01 (4th-part is now always zero). I could not reproduce any issues with the C# compiler, but ReSharper was confused. Maybe the compiler behaves differently to the C# compiler in this case.

Could you try again with the new MathNet.Numerics.Data.Matlab v3.0.0-beta02 (requires MathNet.Numerics >= v3.0.0-beta03)? Unfortunately the Matlab reader API changed in a breaking way (now a static class), so it's not just a drop-in replacement. The API will be stable again once v3 is released.

Marked as answer by cdrnet on 7/20/2014 at 9:56 AM