无法在 VS 2012 中打开 .sdf 文件:未指定的错误 [英] Can't open .sdf file in VS 2012: Unspecified error

查看:37
本文介绍了无法在 VS 2012 中打开 .sdf 文件:未指定的错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在 Visual Studio Web Express 2012 中打开 .sdf 文件.这是我当地的 Orchard 环境,但我想这并不重要,因为我在谷歌搜索时到处都发现了这个错误.但是,我只找到了适用于 Visual Studio 2010 及更低版本的解决方案,因此它们似乎不适用于我,因为它们通常包括安装适用于 SQL Server Compact 的 Visual Studio 2010 工具.这显然不适用于 2012.

I am trying to open an .sdf file in Visual Studio Web Express 2012. It's my local Orchard environment, but I suppose that doesn't matter much, as I have found this error all over the place when Googling. However I only found solutions for Visual Studio 2010 and lower, so they don't seem to apply to me, since they usually include installing Visual Studio 2010 Tools for SQL Server Compact. Which doesn't work with 2012 obviously.

这是我尝试直接从 VS 解决方案资源管理器打开文件时出现的错误:

Here is the error when I try to open the file directly from VS Solution Explorer:

什么鬼?

当我尝试配置数据连接时,SQL Server Compact 不存在:

When I try to configure a data connection the SQL Server Compact isn't there:

我尝试通过 Web 平台安装程序重新安装 SQL Server Compact 最新版,但这没有帮助.但是,我可以在 LinqPad 中打开数据库:

I tried to reinstall SQL Server Compact Latest via the Web Platform Installer, but that didn't help. I can however, open the database in LinqPad:

对 Visual Studio 2012 有什么想法吗?

Any ideas on whats going on with Visual Studio 2012?

谢谢

PS:抱歉,如果我在某处忽略了解决方案.只睡了 2 个小时左右.

PS: Sorry if I overlooked the solution somewhere. Got only 2 hours of sleep or so.

推荐答案

看看这个 MSDN 论坛发帖.它并不完全符合您的情况,但我相信这个特殊问题与源代码控制有关,而不是您使用的语言.

Take a look at this MSDN Forum posting. It doesn't exactly match your circumstances, but I believe this particular problem is tied to source control and not the language you're working with.

关于该做什么的答案是该帖子的大约 2/3.

The answer on what to do is about 2/3rds of the way into that posting.

所以,我取消绑定项目(选择解决方案文件,然后文件 -> 源代码管理 -> 高级 -> 更改源代码管理),然后重新绑定它们.

So, I unbound the projects (select solution file, then File -> Source Control -> Advanced -> Change Source Control), and then rebound them.

经过一些额外的调查,我发现这个问题可能与 .suo 文件有关.此 SO 答案 表明 .suo 文件是有效的一次性文件,因此您可以关闭您的解决方案;删除.suo;重新打开解决方案,未指定的错误"应该会消失.

After some additional investigation, I found that this issue may be related to the .suo file. This SO answer indicates that the .suo file is effectively disposable, so you can close your solution; delete the .suo; re-open the solution and the "Unspecified error" should go away.

我尝试了两种方法(unbind | bind)和删除 .suo 文件,它们都对我有用.

I've tried both methods (unbind | bind) and deleting the .suo file, and both of them worked for me.

这篇关于无法在 VS 2012 中打开 .sdf 文件:未指定的错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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