Visual Studio 2022 Memory Leak

Brian Elliott 26 Reputation points
2022-06-09T10:01:20.107+00:00

I'm having some issues in which Visual Studio 2022 (Professional) appears to have a memory leak.
When I use it for a length of time, whilst accessing and running different solutions my memory creeps up.
The highest I've got this to is 10GB before my computer just became completely unresponsive (as I've got 16GB of RAM).

It seems to be profile specific though, as none of my other colleagues have this issue, and I can replicate this on another machine at home.
I've attached all processes running. Does anything look out of ordinary in here?

209875-vs2022.png

Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
4,627 questions
{count} votes

4 answers

Sort by: Most helpful
  1. satya karki 986 Reputation points MVP
    2022-09-09T15:02:42.34+00:00

    I am also using VS 2022 professional and have a similar kind of memory leakage problem when running multiple projects.

    3 people found this answer helpful.
    0 comments No comments

  2. Etienne D 11 Reputation points
    2022-09-12T07:15:04.247+00:00

    @satya karki @Brian Elliott It looks like the trick is to disable this option, it seems to work for me :
    Options > Text Editor > C# > Advanced > "Run code analysis in separate process"

    Source: StackOverflow

    1 person found this answer helpful.
    0 comments No comments

  3. MikeOtown 21 Reputation points
    2022-09-14T15:16:50.07+00:00

    When I open 1 particular .Net 5 C# solution, VS 2022 memory rises up to 22GB and goes up and down. I have tried disabling "Run code analysis in separate process".

    241113-image.png

    0 comments No comments

  4. Robert Roth 0 Reputation points
    2024-04-25T16:02:46.9733333+00:00

    The problem remains un-resolved in 17.19.6. The C++ fix is:

    Tools-Options-Text Editor-C++-Advanced-Disable Background Code Analysis-True

    Bob

    0 comments No comments