Visual Studio OutOfMemory errors when saving files

ribkix 1 Reputation point
2021-04-06T12:42:51.423+00:00

When I save a file in Visual Studio I get OutOfMemory errors. I literally have 32 GB of memory but ok. I tried to report the problem but the feedback page keeps saying that I don't have Visual Studio open. I have tried repairing Visual Studio already, updated and everything but it all doesn't help. I am experiencing this issue with WinForms C#.

84877-image.png

It's for sure this isn't a RAM issue, but also not a CPU issue. My CPU is AMD Ryzen 7 3700X 8-Core so this shouldn't be occuring.

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

2 answers

Sort by: Most helpful
  1. Michael Taylor 47,966 Reputation points
    2021-04-06T15:57:16.053+00:00

    VS is limited to 4GB as it is a 32-bit process so having 32GB doesn't really help here. To help alleviate this newer updates to VS have started moving lots of stuff out of process to reduce memory constraints. However you can still run out of memory for large enough solutions.

    I would recommend that you use the Report a Problem in the top right of VS to report the issue. As part of this you can replicate the issue while recording the problem and this will send the necessary information to MS for diagnostics.

    You might also need to temporarily disable any extensions you are running to eliminate an issue with extensions. Extensions like ReSharper and CodeRush can use up a lot of memory, causing issues.


  2. Dylan Zhu-MSFT 6,406 Reputation points
    2021-04-07T09:04:56.08+00:00

    Hi ribkix,

    We suggest you report this problem through visual studio installer.
    85173-image.png

    Best Regards, Dylan

    If the answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our * *documentation* to enable e-mail notifications if you want to receive the related email notification for this thread.**