Thank you for your concise explanation of this problem. I ran into this same issue yesterday. I still haven't found a permanent solution, but here is my current workaround.
I'm using the Database.EnsureCreated() function to create the database.
Set connection string to include 'AtachDBFilename=AttachDBFilename=' setting.
Server=(LocalDB)\\MSSQLLocalDB;Database=ExploreCalifornia;AttachDbFilename=.\\ExploreCalifornia.mdf;Trusted_Connection=True;MultipleActiveResultSets=true
Run the application. It will generate an error:
Cannot attach the file '.\ExploreCalifornia.mdf' as database 'ExploreCalifornia'.
but it will create the database.
After that, change the connection string and remove 'AtachDBFilename=AttachDBFilename='.
Server=(localdb)\\MSSQLLocalDB;Database=ExploreCalifornia;Trusted_Connection=True;MultipleActiveResultSets=true
I ran the application again with no errors and tables were created.
Hope this helps!