VS2010 depends on SQL Server Compact 3.5 for IntelliSense?

青春壹個敷衍的年華 提交于 2019-12-23 04:48:25

问题


I've just recently installed VS2010 Professional (trial) on my WinXP machine. Knowing that I only needed it for a VC++ project (with no databases), I "unchecked" the install options for SQL Server.

However, when I try to create a new project (I've tried all variations of MFC and Win32 project types), I am presented with a lovely error message box:

An error occurred while creating or opening the C++ browsing database file c:\path-to-project\testProject.sdf. IntelliSense and browsing information will not be available for C++ projects.

Ensure that Microsoft SQL Server Compact 3.5 is installed and that no other applications are accessing the file. If this problem persists, delete the file and reopen the solution.

If I hit "Ok" VS will still allow me to "develop," except for when I try to add an event handler to a control. Then I am given:

An error has occurred in the script on this page.

The solution's source code database may not have been opened. Please make sure the solution is not open in another copy of Visual Studio, and this its .sdf file is not read only.

Should I have checked the install SQL Server option? If so, why? I don't want it, nor will I be using it. Or rather, what do I need to do to make things work without the errors?

EDIT/Solution So, it turns out that since the machine I was installing on is not connected to the internet, it was not getting those "wonderful" Microsoft updates, which coincidentally would've installed SQL Server Compact for me! much thanks to @ErikEJ for the clarification.


回答1:


You have to install Sql Server Compact 3.5 with your Visual Studio because MFC application projects use a temporary database by default. IntelliSense, F12, Shift+F12 and viewing class diagrams will not be available without this database.

IntelliSense will still work when developing c# applications, but not when developing MFC applications.



来源:https://stackoverflow.com/questions/14716068/vs2010-depends-on-sql-server-compact-3-5-for-intellisense

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