How to disable new AI-based IntelliCode in VS 2022?
Asked Answered
C

4

60

On the surface the new AI-based IntelliCode for Visual Studio 2022 seems cool. So when I installed VS2022 and it asked if I wanted to allow training models on my code, I said sure because I wanted to see how it improved the developer experience.

But now that I've been coding with VS2022 for a week, I find that working with my 300K lines codebase constantly feels slow in the editor compared to VS2019. And I've even seen weird stuff where I'm sure I keyed one thing but the code got butchered to something totally different, sometimes several lines of code above where I was working. Somehow the VS2022 editor and I are not in sync. Also, while using the editor I've been hearing the fan on my machine kick in at high speeds indicating my machine is working very hard. I don't ever remember this being the case in VS2019. So my first thought to fix all this is to get back to more of a VS 2019 IntelliCode experience in VS2022.

So I went into Tools > Options > IntelliCode > General to turn of the new capabilities. I'd still like to have IntelliCode like it worked in VS2019 but I'd like to turn off the new AI powered models that are (theoretically) slowing down my editor experience. When looking at the settings, it's not clear which ones to change. Worse, it's not even clear when ones are enabled or disabled. They all show Default.

enter image description here

Taking a look at the Microsoft Docs doesn't help much either. It doesn't provide any info about which of these Default options are enabled by default or disabled by default.

I can guess that I probably want to disable Automatic model training and maybe C# deep-learning base model for completions. But should I be disabling others? And if I do turn off C# deep-learning base model for completions will I be disabling functionality I want that was in VS2019? I fired up VS2019 to check it's IntelliCode options and alas all the setting there are set to Default as well. So I neither know what was enabled before or what is enabled now. I only know my editor experience isn't making me happy.

Can anyone shed some light on how to configure these settings so that I have the kind of intelliCode experience I enjoyed in VS2019 without all the overhead of the additional AI IntelliCode features added in VS2022?

Churn answered 17/11, 2021 at 15:37 Comment(6)
Extensions -> Manage Extensions, find and select the IntelliCode extension, and then click Disable.Diagenesis
@viveknuna - That's super interesting. I wouldn't have even thought to look in Extensions. But it seams that may disable all IntelliCode support since when I look in VS2019 it has this same Visual Studio IntelliCode extension enabled, albeit a different version of the extension.Churn
@Churn - Curious if it's possible to download the version of the extension used in VS2019. I tried looking myself, but it didn't look possible. However, maybe it's the new features under Completions for whole lines of code that could be causing you performance issues? You could try disabling those if you have not.Stultz
@The2Step Agreed. Right now I'm trying disabling Apply completions for whole lines on right arrow, Show completions for whole lines of code, Automatic model training, and C# deep-learning bas model for completions. It'll take a while to see how that feels.Churn
@Churn are you not looking for this?Diagenesis
@viveknuna I don't want to lose all of the intellisense abilities provided by IntelliCode, I just want to turn off the new AI based additions added in VS2022. I still want to keep the IntelliCode abilities that I had in VS2019.Churn
C
21

The solution I present below no longer works as of Version 17.5 of VS2022, May 2023.
Thank you @ceramic-pot for pointing this out. I have confirmed that the options have changed. I will leave the original answer below as it will likely be of use to people using an earlier version of VS2022.

Original Answer:

So this is what worked for me. I went to Tools > Options > IntelliCode > General and selected `Disabled' for the following:

  1. "Apply completions for whole lines on right arrow"
  2. "Show completions for whole lines of code"
  3. "C# team models for completions"
  4. "Automatic model training," and
  5. "C# deep-learning bas model for completions"

The above are the new IntelliCode setting as best I can tell from comparing the settings to VS 2019. Once these were Disabled, the performance of my machine while in the VS2022 editor returned to normal. My editor experience now feels similar to what I had is VS2019. I'm back to being a happy camper.

enter image description here

Churn answered 24/11, 2021 at 13:57 Comment(4)
Microsoft seems to have updated the relevant information, which can be deleted in View> Other Windows> IntelliCode page. You can choose whether to change the answer after confirmation..Pittsburgh
Just a little bit better, but not as smooth as VS2019Ciao
Version 17.5, May 2023: these options aren't available anymore. It isn't possible to disable some stupid, useless and ANNOYING features. They keep pushing this artificial garbage down all users' throats. It should be noticed that not all users lack natural intelligence.Magenmagena
I don't want my efforts to be fodder for Microsoft to train their AI.Stomato
U
14

I see a purple bulb spanner Icon at the bottom of the editor in version 17.6.2

enter image description here

You have a few options to turn it off I believe

enter image description here

Upbow answered 7/6, 2023 at 20:10 Comment(2)
this is the answer that works as I type this in 03/2024Lyricism
Upvoted for being the answer for 2024. I would have never thought to look for a tiny icon at the bottom of the editor!Tonyatonye
F
6

I made an account just to say that I may have found a way to do it even past 17.5 when the options disappeared:

  1. Go to Tools > Options > Intellicode and turn everything off.
  2. Close Visual Studio.
  3. Go to your .vssettings file (%APPDATA%/Local/Microsoft/VisualStudio/17.[version]/Settings/CurrentSettings.vssettings)
  4. You will see an XML file with many settings. Find IntelliSense-related options (EnableTemplateIntelliSense, EnableSingleFileISense, DisableSharedIntelliSense, DisableIntelliSenseUpdating and DisableIntelliSense) and turn them on or off, depending on context. If it doesn't work, try disabling more IntelliSense/IntelliTrace options (I also lowered IntelliSenseProcessMemoryLimit, just in case).

Proof when it works:

  1. The "Loading IntelliSense" background task (bubble button in bottom left corner) loads faster. Before, it was one of the last tasks to load, now it's one of the first.
  2. IntelliCode button (purple lightbulb next to the zoom button in bottom left corner) shows only 1 option instead of 3.
  3. It runs faster. I have C# files with 1000+ lines of code that made VS freeze every 5 seconds, now they run smoothly.

Please don't report it to Microsoft so they don't remove it.

Furze answered 14/10, 2023 at 19:36 Comment(0)
S
0

Click on the small icon with a wrench and a light bulb at the bottom left of the window and deselect "Show completions for lines of code."

enter image description here

Sampling answered 21/2, 2024 at 13:51 Comment(0)

© 2022 - 2025 — McMap. All rights reserved.