0

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.

Community
  • 1
  • 1
redhotspike
  • 1,056
  • 5
  • 17
  • 39
  • It might be due to corrupted installation try to repair it using updated vs – Garry Feb 05 '13 at 20:16
  • SQL Server is NOT SQL Server Compact - reinstall/repair SQL Server Compact 3.5 SP2 Desktop runtime – ErikEJ Feb 06 '13 at 06:53
  • @ErikEJ That was my understanding, too. After looking a little closer I noticed that there is NO installed version of SQL Server Compact on the machine...did VS2005 (what I used previously on that machine) not require SQL Server CE? – redhotspike Feb 06 '13 at 13:18
  • I should also note that the ".sdf" file is never created...does that also indicate a functionality of SQL Server CE? – redhotspike Feb 06 '13 at 13:31
  • Possibly VS 2005 could install an older version (3.0 or 3.1), but that is unrelated. 3.5 SP2 is always installed together with VS 2010 – ErikEJ Feb 06 '13 at 14:13

1 Answers1

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.

Simon MᶜKenzie
  • 8,344
  • 13
  • 50
  • 77
sugin
  • 26
  • 2
  • Thank you for clarifying this - I didn't realize that MFC application projects use a temporary database. Has it always been that way or is that something new(er)? – redhotspike Jun 03 '13 at 19:51
  • "Back then" VisualStudios (and I think even VS6.0 had it) kept their C++ metadata cache in files with the .NCB extension. They were most known by their 'innate ability' to grow to tens of megabytes and getting corrupted at some point of time, what caused the autocompletion to turn off itself. You had to delete the NCB file, reopen and rebuild the project, and then you've had your autocompletion back. But since NCB had to be regenerated, it took minutes or worse. It seems that VS team finally decided to switch to some general database and indexing engine, rather than to patch the old&hairy one. – quetzalcoatl Aug 26 '13 at 14:30
  • more FYI: http://stackoverflow.com/questions/5077631/why-is-intellisense-unavailable-for-c-cli – quetzalcoatl Aug 27 '13 at 06:35