views:

77

answers:

1

I have a Visual Studio 2008 solution which builds a C# class library (Project X) and C# Windows Application (Project Y).

In the unit test project for the C# class library (XTEST) , Intellisense works as expected and auto-completes the names of classes etc.

In the unit test project for the windows application (YTEST), Intellisense has stopped working and only auto-completes with the names of accessor classes, not the names of actual classes. Intellisense also reports lots of class names as being unknown/undefined. These appear in the error tab, but disappear after compilation.

Possibly relevant facts:

  • The projects all build correctly, and the tests run.
  • All programming is in C#, .Net 2.0 Framework, VS 2008 SP1.
  • It used to work...!
  • The Project Y was converted to VS 2010, then converted back to V20008 at one point. It's possible that other projects may have been converted and then converted back too.

Can any inspired reader point me in the right direction to fix the Intellisense in Project YTEST?

Answer

Turned out to be an issue with .cache files in the project obj directory. Deleting these fixed the problem.

+2  A: 

try deleting the .ncb file in your project folder. This will force intellisence to regenerate the symbol database.

s_b
I think you are thinking of C++ not C#. .ncb files are used by the C++ compiler. They do not exit in C# projects. But you are correct in it being a cache problem, and since you put me on the right track you get the tick!
MZB