The type provider cannot connect to localDB

I have the following F # script. I copied the connection string from a working Asp.net Mvc project. However, he received the following error. The connection string must be correct, as the Asp.Net Mvc project works fine. Or does a provider like F # not accept a connection string?

#r "System.Data.Entity.dll" #r "FSharp.Data.TypeProviders.dll" #r "System.Data.Linq.dll" open System.Data.Linq open System.Data.Entity open Microsoft.FSharp.Data.TypeProviders type private EntityConnection = SqlEntityConnection<ConnectionString= "Data Source=(LocalDb)\v11.0;Initial Catalog=MyDB;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|\MyDb.mdf", Pluralize = true> 

Script1.fsx (9,33): error FS3033: a provider of the type "Microsoft.FSharp.Data.TypeProviders.DesignTime.DataProviders" reported an error: Error reading schema. Error 7001: the provider did not return the ProviderManifestToken string. When connecting to SQL Server, a network-related or specific instance error occurred. The server was not found or was not available. Verify the instance name is correct and configure SQL Server to connect remotely. (provider: Named Pipes provider, error: 40 - Could not open connection to SQL Server). Network path not found.

+4
source share
1 answer

You might want to check that v in v11.0 is known to cause some problems. Even if your connection is not case sensitive, try wrapping it and see if it works: v11.0 .

+10
source

Source: https://habr.com/ru/post/1490017/


All Articles