I am trying to use app.config file to load the connection string into the type provider but I am receiving the following error:
error FS3033: The type provider
'Microsoft.FSharp.Data.TypeProviders.DesignTime.DataProviders'
reported an error: Invalid provider''
in connection string entry'Server1'
in config file'...\app.config'
.SqlDataConnection
can only be used with provider'System.Data.SqlClient'
.
I put the connection strings in the app.config file as so:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="FSharp.Core" publicKeyToken="..." culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.3.1.0" newVersion="4.3.1.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
<connectionStrings>
<add name="Server1" connectionString="Server=..."/>
<add name="Server2" connectionString="Server=..."/>
</connectionStrings>
</configuration>
and then reference them in F# as so:
type dbSchema = SqlDataConnection<ConnectionStringName = "Server1", Views = false, Functions = false, StoredProcedures = false>
Any thoughts where the issue is?