SQLProvider icon indicating copy to clipboard operation
SQLProvider copied to clipboard

assemblies System.memory and system.threading.tasks.extensions not found

Open piske-alex opened this issue 6 years ago • 3 comments
trafficstars

Description

Intellisense worked fine without problem, but when building the project, the following occured

The type provider 'FSharp.Data.Sql.SqlTypeProvider' reported an error: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.Details: Could not load file or assembly 'System.Memory, Version=4.0.1.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' or one of its dependencies. ???????????Could not load file or assembly 'System.Threading.Tasks.Extensions, Version=4.1.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' or one of its dependencies. ???????????

Repro steps

Please provide the steps required to reproduce the problem

  1. Install Visual Studio 2019

  2. Create new f# project

  3. Target net472

  4. Install sqlprovider from nuget, latest version

  5. Build project

Expected behavior

I expect the project to build

Actual behavior

It does not build

Known workarounds

Please provide a description of any known workarounds.

Related information

  • Used database: MYSQL
  • Operating system: Windows
  • Branch
  • .NET Runtime, CoreCLR or Mono Version: net472
  • Performance information, links to performance testing scripts

piske-alex avatar Nov 15 '19 06:11 piske-alex

https://github.com/fsprojects/SQLProvider/tree/master/tests/SqlProvider.Core.Tests/MySql

I followed this tutorial

piske-alex avatar Nov 15 '19 07:11 piske-alex

type 'FSharp.Data.Sql.SqlDataProvider,DatabaseVendor="3",ConnectionString="Server=localhost;Database=test;User=root",ResolutionPath="C:\\Users\\user\\source\\repos\\AdminDataBindings\\AdminDataBindings/libraries",Owner="HR"', member 'GetDataContext'. The error: Method 'System.String tryGetConnectionString(Boolean, System.String, System.String, System.String)' not found in type '<null>'. This method may be missing in the types available in the target assemblies.

This is also a related error

piske-alex avatar Nov 15 '19 07:11 piske-alex

So are you using .NET Framework or .NET Core? The tutorial you are using is meant for .NET Core, meanwhile the script you are using is .NET Framework.

If you are not using the core, don't use that tutorial. :-)

Thorium avatar Feb 04 '20 11:02 Thorium

Should be fixed already

Thorium avatar Nov 20 '23 23:11 Thorium