mettekou/FSharp.Data.Tdms

System.IO.FileNotFoundException: 'Could not load file or assembly 'FSharp.Core, Version=4.4.3.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.

Closed this issue · 1 comments

Hello, I am trying to use this package at C#, so I wrote simple code like following:

using System;
using FSharp.Data.Tdms;

namespace FsharpTdmsTest
{
    class Program
    {
        static void Main(string[] args)
        {
            bool ret = File.Read(@"Sample.tdms", true)
                .TryGetRawData("GroupName", "ChannelName",
                    out double[] data);

            Console.WriteLine("Start!");
            foreach (var d in data)
            {
                Console.WriteLine("{0}", d);
            }
            Console.WriteLine("End!");
        }
    }
}

Unfortunately, when I run this code, even though tdms file exists at debug folder, an exception is thrown at File.Read like following:

System.IO.FileNotFoundException: 'Could not load file or assembly 'FSharp.Core, Version=4.4.3.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.

I saw similar phenomenon here,
but my usage is not F# but C#, all I could do was setting Target framework of Application as ".NET 5.0".
(This API is only able to be used at .NET 5.0, isn't it?)

I couldn't resolve this exception so far.
Could you enlighten me why this exception is occurred or,
could you upload any small C# sample project?

I installed FSharp.Core at Nuget Package Manager and it is solve. My bad!