locked
AddIn exception: The solution's source code database may not have been opened. RRS feed

  • Question

  • I have installed on my computer the Google Test Add-in:

    http://googletestaddin.codeplex.com/

    It "works on my machine"... 

    On a different computer though, with the exact same configuration, so it seems to me, its buttons are grayed out. Running it through the Debug, I got

    in the QueryStatus,  on the second "if" line

    if ( neededText == vsCommandStatusTextWanted.vsCommandStatusTextWantedNone )
    {
      if (	applicationObject == null || applicationObject.ActiveDocument == null || 
    applicationObject.ActiveDocument.ProjectItem == null ||
    applicationObject.ActiveDocument.ProjectItem.ContainingProject == null ||
    ( applicationObject.ActiveDocument.ProjectItem.ContainingProject.CodeModel.Language != CodeModelLanguageConstants.vsCMLanguageVC &&
    applicationObject.ActiveDocument.ProjectItem.ContainingProject.CodeModel.Language != CodeModelLanguageConstants.vsCMLanguageMC ) )
      {
        statusOption = vsCommandStatus.vsCommandStatusUnsupported;
        return;
      }
    //...
    }

    I don't know how to troubleshoot this problem... I tested this to see if it may be that perhaps some sdk was not installed - by running it in a virtual environment that didn't even have room for SP1, but I had no problem with it.

    What does this error mean, and how can I fix it ?

    I am running Visual Studio 2010 (SP1).

    Thank you.

    Monday, January 7, 2013 7:19 PM

Answers

  • Breaking the monster if up into seperate tests would be a good first step, otherwise it will be very difficult to know what test is causing the error.

    In general I avoid DTE for reasons like this. It often causes lots of things to be spun up and anytime you do that, things can fail, though if you require CodeModel there is no alternative to DTE. I suspect the code model for C++ needs to be able to access the SDF file, which afaik, is the on-disk intellisense database. As the error message states I suspect either the sdf is read-only (i.e. it is checked in to source control, which it shouldn't be) or it is opened in another instance of VS on the same machine and it can't open it in the mode it is attempting to do so.

    Ryan
    • Marked as answer by emptyheaded Tuesday, January 8, 2013 8:15 PM
    Tuesday, January 8, 2013 1:22 AM

All replies

  • Breaking the monster if up into seperate tests would be a good first step, otherwise it will be very difficult to know what test is causing the error.

    In general I avoid DTE for reasons like this. It often causes lots of things to be spun up and anytime you do that, things can fail, though if you require CodeModel there is no alternative to DTE. I suspect the code model for C++ needs to be able to access the SDF file, which afaik, is the on-disk intellisense database. As the error message states I suspect either the sdf is read-only (i.e. it is checked in to source control, which it shouldn't be) or it is opened in another instance of VS on the same machine and it can't open it in the mode it is attempting to do so.

    Ryan
    • Marked as answer by emptyheaded Tuesday, January 8, 2013 8:15 PM
    Tuesday, January 8, 2013 1:22 AM
  • Thank you. It appears that on the computers where this was not running, Intellisense was turned off.


    Tuesday, January 8, 2013 8:15 PM