2

I have a problem. I can't add a new class to a solution in Microsoft Visual Studio 2012. When I right click on solution and chose Class Wizard... I get this error:

enter image description here

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 that its .sdf file is not read only.

When I right click on solution, go Add Item -> Class, I get a new "Add Class" window, but I can't get past it cause no matter what I chose when I click the "Add" button, the window goes down and it instantly comes up back again.

I don't know what's wrong.

Community
  • 1
  • 1
LDV
  • 23
  • 4

1 Answers1

1

It would be definitely be helpful if you could post the error message itself (rather than a screenshot to the error):

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.

The solution is here:

VS2010 depends on SQL Server Compact 3.5 for IntelliSense?

You have to install Sql Server Compact 3.5 with your Visual Studio because MFC application projects use a temporary database by default.

Community
  • 1
  • 1
FoggyDay
  • 11,962
  • 4
  • 34
  • 48