SSDT在Visual Studio 2012破碎然后固定,再次破碎VS2013破碎 [英] SSDT on Visual Studio 2012 broken then fixed, broken again also broken on VS2013

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

问题描述

在Windows 8上安装Visual Studio 2012 Ultimate后,SSDT通过SQL Server对象资源管理器无效。解决方案是从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进行连接,因为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.

推荐答案

是数据源=(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

[查看,SQL服务器对象资源管理器],

右键单击节点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.

你现在应该看到(localdb) SQL Server对象资源管理器中的\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.

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

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