Visual Studio cannot confuses NET FW and NET probably. When I have FSX opened in Ionide, then type provider works fine.
Repro steps
- Create test.fsx with following content
#r "nuget: Npgsql"
#r "nuget: SQLProvider"
open FSharp.Data.Sql
let [<Literal>] connectionString = "Host=localhost;Port=5432;Database=backend;Username=konaev;Password="
// create a type alias with the connection string and database vendor settings
type sql = SqlDataProvider<Common.DatabaseProviderTypes.POSTGRESQL, connectionString>
- Open test.fsx in visual studio.
Expected behavior
I would like to have no errors in Visual Studio.
Actual behavior

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.Runtime, Version=7.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
Could not load file or assembly 'System.Data.Common, Version=7.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
Could not load file or assembly 'System.Diagnostics.Tracing, Version=7.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
Could not load file or assembly 'System.Threading, Version=7.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
Could not load file or assembly 'System.ComponentModel.TypeConverter, Version=7.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
Current execution platform: .NETFramework,Version=v4.7.2
Known workarounds
Provide a description of any known workarounds.
Related information
Provide any related information (optional):
- Operating system
- .NET Runtime kind (.NET Core, .NET Framework, Mono)
- Editing Tools (e.g. Visual Studio Version, Visual Studio) Version 17.7.0 Preview 2.0
Visual Studio cannot confuses NET FW and NET probably. When I have FSX opened in Ionide, then type provider works fine.
Repro steps
Expected behavior
I would like to have no errors in Visual Studio.
Actual behavior
Known workarounds
Provide a description of any known workarounds.
Related information
Provide any related information (optional):