Closed TomBecker-BD closed 1 month ago
Hello, thank you for filling the issue regarding your build as the message indicates. This failure seems to be related to the OutOfMemoryException
, which means your system might not have enough memory to run the build.
Could you check that:
1) Your system was doing any memory heavy processing task at the same time as the build?
2) Can you reproduce this with nothing else running on your machine?
The original exception was: "Unhandled Exception: System.IO.FileLoadException: Could not load file or assembly 'Microsoft.CodeAnalysis.CSharp, Version=4.11.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The paging file is too small for this operation to complete. (Exception from HRESULT: 0x800705AF)".
The System.OutOfMemoryException came later.
MSBuild doesn't handle System.OutOfMemoryException
very well, and it ends up throwing other unrelated exception depending on where it ran out of memory.
We do appreciate bug and issue reports, and make an effort to look into all of them. If you do not expect to run into this issue again, I will close this issue. If you happen to run into it again, please feel free to reopen it and we can work together to collect more information on it.
Issue Description
Building a Visual Studio solution with mixed C++ and C# projects.
First build failure:
Unhandled Exception: System.IO.FileLoadException: Could not load file or assembly 'Microsoft.CodeAnalysis.CSharp, Version=4.11.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The paging file is too small for this operation to complete. (Exception from HRESULT: 0x800705AF)
Followed by four identical
This is an unhandled exception in MSBuild
failures with the same message and stack trace.Steps to Reproduce
Unhandled Exception: System.IO.FileLoadException: Could not load file or assembly 'Microsoft.CodeAnalysis.CSharp, Version=4.11.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The paging file is too small for this operation to complete. (Exception from HRESULT: 0x800705AF)
This is an unhandled exception in MSBuild
. The error message and stack trace look the same for all four failures.I am not expecting to be able to reproduce this issue. I restarted the PC and was able to build successfully.
Actual Behavior
Analysis
No response
Versions & Configurations
Microsoft Visual Studio Enterprise 2022 (64-bit) - Current Version 17.11.4
MSBuild version 17.11.9+a69bbaaf5 for .NET Framework 17.11.9.46202