Description
I first created a MySQL type provider by specifying Database=db1, and successfully got the types created. But when I change to Database=db2, the created types are still for db1. Meaning that when I try to do Intellisense, the suggested types does not contain db2, and when I try to write a query for db2, the query expression does not type check. I tried to restart Visual Studio, the problem does not go away.
The following is my code:
r "../../packages/MySql.Data.6.9.7/lib/net45/MySql.Data.dll"
r "../../packages/SQLProvider.0.0.9-alpha/lib/net40/FSharp.Data.SqlProvider.dll"
open System
open System.Linq
open FSharp.Data.Sql
open MySql.Data
[]
let ResolutionPath = @"SOME_FOLDER\packages\MySql.Data.6.9.7\lib\net45"
type sql = SqlDataProvider<"Server=SERVER_NAME;Database=db2;Uid=USER;Pwd=PASSWORD", Common.DatabaseProviderTypes.MYSQL,ResolutionPath=ResolutionPath>
let ctxt = sql.GetDataContext()
I used Database=db1 first, it worked. But when I change to Database=db2, the generated types does not contain the ones for db2. I do have db2 in my database and I can access it through MySQL workbench under the connection string.