This is a re-post of an issue from the main VisualFSharp GitHub site upon recommendation from @dsyme. Original here: dotnet/fsharp#1301
Description
If the schema of a database to which there is a connection via type providers SqlDataConnection or SqlEntityConnection is altered, the changes are not accessible within Visual Studio and are not represented by IntelliSense.
However, changing the connection string in some "insignificant" way, such as adding white space, will force the refresh of the schema. Restarting Visual Studio will also refresh the schema.
This is okay when working with an established, production database, but when developing a database and making frequent changes to it, this becomes very annoying.
Repro steps
Connect to a database via an SQL type provider. Add and/or drop tables from database (other changes not tested). Try to refer to the new tables within code.
Expected behavior
That changes to database schema be immediately reflected in IntelliSense and usable in code.
Actual behavior
Old schema still present in IntelliSense, e.g., no newly added tables are accessible, and dropped tables are still listed. Even turning off "Statement Completion" doesn't help. Reference to a new table shows as an error.
There is no background process to detect changes to database structure and update the schema upon which F# is operating.
Known workarounds
Add white space to connection string which doesn't affect the functionality. Example:
"Data Source=(localdb)\ProjectsV13;Initial Catalog=db"
can be changed to "Data Source =(localdb)\ProjectsV13; Initial Catalog = db"
(spacing placed around equals and semicolon)
Related information
All versions of F# and Visual Studio to-date.
Feature Request
Response from @dsyme: "Presumably that would work by a regular background task polling the database to look for schema changes."
I have no way of knowing if this is feasible, but it would be WONDERFUL if it were fixed. I assume that the issue revolves around the IDE.