This project has moved. For the latest updates, please go here.

Version Conflict using MatrixReader

Jun 1, 2014 at 11:23 PM
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 3.0.0.0 and an indirect reference (through 'MathNet.Numerics.Data.Matlab.MatlabMatrixReader.ReadMatrix') to version 3.0.0.46. Change the direct reference to use version 3.0.0.46 (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 1, 2014 at 11:41 PM
This was not a problem in my last project which was using 3.0.0 beta01.
Coordinator
Jun 2, 2014 at 8:18 PM
Edited Jun 2, 2014 at 8: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 8: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 8:57 PM
Edited Jun 2, 2014 at 8:58 PM
Actually not the data.text.
Here is my package.config:
  <?xml version="1.0" encoding="utf-8"?>
 <packages>
 <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" />
  </packages>
Coordinator
Jun 15, 2014 at 2: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 VB.net 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.

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