Last post Feb 07, 2015 11:51 PM by Kevin Shen - MSFT
Feb 05, 2015 03:02 PM|Alex_808|LINK
I have a project that uses entity framework. I added my class that inherits from DbContext and left everything with the default values and everything worked fine. It created the db automatically and I was able to Seed the database and start coding away.
Now I retrieved the solution via git source control on another computer that uses the same version of Visual Studio 2013 and now when I execute the same code I get:
A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider:
SQL Network Interfaces, error: 50 - Local Database Runtime error occurred. The specified LocalDB instance does not exist.
How can I tell EF to just re-create the database so I can keep working?
I tried running Enable-Migrations -ProjectName Infrastructure -Force again but still end up with the same issue
Feb 06, 2015 08:13 PM|thaicarrot|LINK
Apparently that there's dome problem with your connectionstring or Local SQL instance, Please correct it. Web.Config file
Feb 07, 2015 11:51 PM|Kevin Shen - MSFT|LINK
In your project ,the connection string refer to the database which has been created in your localdb.
After you retrieved the solution via git source control on another computer,the connection string still connect to the previous database.
While the database didn't exist in your current computer.
So please create a new database ,add modify your connection string referring to the database.