Visual Studio 2012 上的 SSDT 损坏然后修复,再次损坏在 VS2013 上也损坏 [英] SSDT on Visual Studio 2012 broken then fixed, broken again also broken on VS2013

查看:17
本文介绍了Visual Studio 2012 上的 SSDT 损坏然后修复,再次损坏在 VS2013 上也损坏的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在 Windows 8 上安装 Visual Studio 2012 Ultimate 后,通过 SQL Server 对象资源管理器的 SSDT 不起作用.解决方案是从MSDN网站安装最新版本的VS2012.

After installing Visual Studio 2012 Ultimate on Windows 8, SSDT via SQL Server Object Explorer did not work. The solution was to install the latest version of VS2012 from the MSDN website.

一切都很好.我可以看到数据库,没问题.不管我是使用 EF defaultConnectionFactory 还是我自己的 connectionString,无论哪种方式,我的所有代码优先数据库都显示在 VS2012 SQL Server 对象资源管理器中.

All was well. I could see databases, no problem. It did not matter whether I used the EF defaultConnectionFactory or my own connectionString, either way, all of my code first databases showed up in the VS2012 SQL Server Object Explorer.

不久前,我安装了 Visual Studio 2013 Ultimate.在 VS2013 Ultimate,本地数据库中,我通过属性看到的只是这个连接字符串:

Not long ago, I installed Visual Studio 2013 Ultimate. In VS2013 Ultimate, local db, all I see, via properties, is this connection string:

Data Source=(localdb)Projects;
Initial Catalog=master;Integrated Security=True;
Connect Timeout=30;Encrypt=False;TrustServerCertificate=False  

接下来,当我尝试通过VS2012查看时,VS2012再次坏了.为了让 VS2012 再次工作,我从 MSDN 安装了 2013 年 10 月版本的 SSDT for VS2012.

Next, when I tried to look via VS2012, VS2012 was again broken. To get VS2012 to work again, I installed the 2013 October version of SSDT for VS2012 from MSDN.

虽然 VS2012 SSDT 现在通过 SQL Server 对象资源管理器再次工作,但不幸的是,其行为与 VS2103 中的 SSDT 相同.

While VS2012 SSDT now worked again via SQL Server Object Explorer, unfortunately, the behaviour was identical to that of SSDT in VS2103.

我能够通过 LINQPad4 进行连接,这确实具有一些优势,因为只需右键单击表名即可获得有用的 LINQ 选择.

I am able to connect via LINQPad4 which does have some advantages because of the useful LINQ choices that one gets simply by right-clicking on a table name.

首先使用 EF 6.0.1 代码.

Using EF 6.0.1 code first.

推荐答案

线索是Data Source=(localdb)Projects;

The clue is Data Source=(localdb)Projects;

EF 6.0.1 将数据库放在这里:Data Source=(localdb)v11.0;

EF 6.0.1 puts the databases here: Data Source=(localdb)v11.0;

Data Source=(localdb)v11.0;
Integrated Security=True;Connect Timeout=15;
Encrypt=False;TrustServerCertificate=False

在vs2012/vs2013中的SSDT中【查看,SQL Server对象资源管理器】,
右键单击节点SQL Server",然后单击添加 SQL Server..."

in SSDT in vs2012/vs2013 [View, SQL Server Object Explorer],
right-click the node "SQL Server", then click "Add SQL Server..."

输入(localdb)v11.0"作为服务器名称,然后点击连接.

Type "(localdb)v11.0" for the server name and click Connect.

您现在应该在 SQL Server 对象资源管理器中看到(localdb)v11.0"和(localdb)Projects".

You should now see both "(localdb)v11.0" and "(localdb)Projects" in SQL Server Object Explorer.

您的代码优先数据库将位于(localdb)v11.0"下的数据库节点中.

Your code first databases will be in the Databases node under "(localdb)v11.0".

FWIW,我完全不知道微软为什么做出这个恼人的改变.

FWIW, i have zero idea why Microsoft made this annoying change.

这篇关于Visual Studio 2012 上的 SSDT 损坏然后修复,再次损坏在 VS2013 上也损坏的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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