Turn off Intellisense in VS 2008 for a single proj

2019-06-26 01:50发布

问题:

I have a project with about 1000 classes in it (no, there is no way to conveniently break this project into multiples). Just loading the project takes about 20 minutes as intellisense slowly chugs through all the classes, and eats almost 1gb of memory. Is there a way to turn off Intellisense for a single project, but keep it for all other projects in the solution?

回答1:

What language is the project in? 1000 classes is quite a small project and should load in no more than 20 seconds. The problem is more likely to be caused by special files in the project that have compile time transforms run on them (eg. code generators). Do you have any code generators running as part of the build?

The problem could also be caused by:

  • Poorly written Visual Studio add-ins. In particular I've seen source control providers cause this problem, but please also list the other add-ins you have installed.
  • Loading the project directly from a network share, or having files in the project that are located on a network share.
  • The development machine is old (slow processor as in single core P4 or earlier, low memory as in 1GB or less). If this is the case you should fix that first.
  • The development machine has bloatware or failing components.


回答2:

The problem is almost certainly not related to Intellisense. There are at least a few things you can try:

  1. Turn off any add-ins you may have installed, such as R# or CodeRush.
  2. With Visual Studio not running
    1. Delete the .suo file for your solution and project, if there is one.
    2. Delete both the bin and obj folders.

After those steps, restart Visual Studio, open your project again and see if you get better performance.



回答3:

Discussion continues on this thread