0

I'm using tickblaze, a software package that runs C# scripts for algorithmic trading. I want to run a strategy that uses linear algebra, so I need MathNet.Numerics package. I referenced MathNet.Numberics, but and I was getting the following errors:

The type 'double' cannot be used as type parameter 'T' in the generic type of method 'Matrix'. There is no boxing conversion from 'double' to 'System.IEquatable.'.
The type 'double' cannot be used as type parameter 'T' in the generic type of method 'Matrix'. There is no boxing conversion from 'double' to 'System.IFormattable'.
The type 'double' cannot be used as type parameter 'T' in the generic type of method 'Matrix'. There is no boxing conversion from 'double' to 'System.ValueType'.
The type 'IEquatable<>' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Runtime, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.
The type 'IFormattable<>' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Runtime, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. The type 'ValueType' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Runtime, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.
The type 'Object' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Runtime, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.

Then, I referenced the System.Runtime File in .NET files (C:\Windows\Microsoft.NET\Framework64\v4.0.30319), and now I have the following error(s):

Assembly 'MathNet.Numerics' with identity "MathNet.Numerics' Version=5.0.0.0, Culture=neutral, PublicKeyToken=###' uses 'System.Runtime, Version=6.0.0.0, Culture=neutral, PublicKeyToken=###'

Can anyone tell what I am missing?

Sir Rufo
  • 18,395
  • 2
  • 39
  • 73
Theron
  • 13
  • 4
  • We won't know how to make the changes to your existing code base without seeing your original code. Please post a [mre]. – gunr2171 Jan 26 '23 at 02:01
  • the exception tells you to add a reference v6.0.0.0 - what makes you feel, that v4.0.x will do the job? – Sir Rufo Jan 26 '23 at 02:32

0 Answers0