fsprojects / SQLProvider

A general F# SQL database erasing type provider, supporting LINQ queries, schema exploration, individuals, CRUD operations and much more besides.
https://fsprojects.github.io/SQLProvider
Other
570 stars 144 forks source link

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

Closed piske-alex closed 8 months ago

piske-alex commented 4 years ago

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

piske-alex commented 4 years ago

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

I followed this tutorial

piske-alex commented 4 years ago

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

Thorium commented 4 years ago

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 commented 8 months ago

Should be fixed already