Can't open .sdf file in VS 2012: Unspecified error

会有一股神秘感。 提交于 2019-12-12 12:09:48

问题


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.

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

What the heck?

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

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:

Any ideas on whats going on with Visual Studio 2012?

Thx

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


回答1:


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.

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.

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.

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



来源:https://stackoverflow.com/questions/14836290/cant-open-sdf-file-in-vs-2012-unspecified-error

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!