在EF 6.1.3和Visual Studio 2015中更新数据库时出错 [英] Error while updating database in EF 6.1.3 and visual studio 2015

查看:128
本文介绍了在EF 6.1.3和Visual Studio 2015中更新数据库时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在包控制台中执行命令update-database -verbose时,



我收到此错误:

While executing the command update-database -verbose in package console,

I got this error:

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: 52 - Unable to locate a Local Database Runtime installation. Verify that SQL Server Express is properly installed and that the Local Database Runtime feature is enabled.)





我如何解决它并创建localDb数据库?



我尝试过:



在应用程序配置文件中我做了以下更改



How do i solve it and create localDb database?

What I have tried:

In app config file I made following change

<parameters>
    <parameter value="(localdb)\MSSQLLocalDB" />
</parameters>

推荐答案

我通过添加VS2015安装程序安装程序中的SQL Server数据工具修复了问题...
I fixed the problem by just adding the "SQL Server Data Tools" from the VS2015 setup installer...


这篇关于在EF 6.1.3和Visual Studio 2015中更新数据库时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆