views:

831

answers:

4

Is there a way to turn off intellisense in Visual Studio 2008? I know about deleting a DLL to turn off intellisense in C++, but that doesn't work for C#. I also know about the preferences but that just turns off the visual display. I want to turn off ALL of intellisense so it does not scan my code at all.

Update 10/14/09: Eric was kind enough to take a look so I sent him some log info. I'll post the resolution here when we get one.

Update: updated title to reflect the changed direction of the thread

Related Question

Turning off Intellisense for a single project in Visual Studio 2008

+1  A: 

In tools > options > Text Editor > C# there is a Intellisense section which looks like it does what you want.

Mathias
Sorry hadn't noted your comment about knowing about the preferences.
Mathias
That's the preference that I've already tried. It only turns off the display, not the scanning. Note here: http://msdn.microsoft.com/en-us/library/ecfczya1(VS.71).aspx that it says the intellisense is available via keystroke even when it's turned off, thus it must be still scanning the code.
Brad Irby
+2  A: 

You need to switch off background compilation.

Here is a HowTo:

http://ira.me.uk/2008/09/01/switch-offon-visual-studio-2008-background-compilation/

Tools -> Options -> Text Editor -> C# -> Advanced -> Show live semantic errors

You will still get error underlining, but you must hit the Build button before they show up.

John Gietzen
That flag is already turned off.
Brad Irby
Then you are probably not diagnosing the problem correctly.
John Gietzen
+1  A: 

Have you tried cleaning your solution from all temporary files created by Visual Studio? Sometimes these files could get corrupted, the chances might especially be high if you migrated from VS 2005.

Close your solution, look for all *.suo and *.ncb files and remove/rename them, and then re-open the solution.

Just another thing to make sure: Are there any third-party add-ins installed? Try to start VS in SafeMode using the /SafeMode command-line option.

0xA3
Good idea on the safemode. It's still taking as long to load, but mem is much lower. Interesting....
Brad Irby
My mistake on the mem comment above - i ran the original test on my dekstop with 8gb, and the /safemode test on my laptop with 2gb.
Brad Irby
+8  A: 

The guys on the VS team looked at this for me and found a problem with intellisense. Here's their description:

"It looks like both of the files you gave me contain a part of static partial class EntityPropertyDescriptors, and I would guess that all the rest of the 500 files do too. What’s happening is that as we build up our IntelliSense cache, each time we parse one of these files, we see that it has a static class in it, and we decide to see if that static class has any extension methods. In order to look for the extension methods, we look through each method in each part to see if it’s an extension method. This causes us to reparse every file in order to see if the type has any extension methods."

They found a similar problem with VS2010 but are fixing it now. Unfortunately, they are not going to fix it in VS2008, so we are left with the workaround of putting all the partial classes into a single file. They can still be partials, but they must be in the same physical file to get around the problem.

After combining all partial classes into a single file, load time for this problem project when from 30 minutes to about 10 seconds.

Big thanks to Eric Lippert and Kevin Pilch-Bisson for helping me with this.

Brad Irby
You're welcome. Thanks again for bringing it to our attention. I'm glad we could get this fixed for VS 2010.
Eric Lippert