Got 'Insufficient system resources exist to complete the requested service' while building Store version of application

0xNima 20 Reputation points
2024-05-20T18:38:53.32+00:00

Hello folks, When I tried to build the Store (MSIX) version of my application via Windows application packaging project in VS 2022, I got the following errors:

......

1>Generating code

1>Finished generating code

1>StartupTask.vcxproj -> C:\....\Release\StartupTask.exe

1>Automatic MOC for target MyApplication

**after a while...
**
1>Child node "4" exited prematurely. Shutting down. Diagnostic information may be found in files in "C:\....\Temp\MSBuildTemp\" and will be named MSBuild_*.failure.txt. This location can be changed by setting the MSBUILDDEBUGPATH environment variable to a different directory.

1>C:\....\Temp\MSBuildTemp\MSBuild_pid-18684_d6ae519576884d319a97c37f0006ed4e.failure.txt:1>UNHANDLED EXCEPTIONS FROM PROCESS 18684:

1>=====================

1>5/20/2024 7:22:27 PM

1>System.IO.IOException: Insufficient system resources exist to complete the requested service.

1>

1>   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)

1>   at System.IO.Pipes.PipeStream.BeginWriteCore(Byte[] buffer, Int32 offset, Int32 count, AsyncCallback callback, Object state)

1>   at System.IO.Pipes.PipeStream.WriteCore(Byte[] buffer, Int32 offset, Int32 count)

1>   at Microsoft.Build.BackEnd.NodeEndpointOutOfProcBase.RunReadLoop(Stream localReadPipe, Stream localWritePipe, ConcurrentQueue`1 localPacketQueue, AutoResetEvent localPacketAvailable, AutoResetEvent localTerminatePacketPump)

1>===================

1>

1>

1>C:\Users\...\Temp\MSBuildTemp\MSBuild_pid-28480_31fcd563a2c9411192e8b7de35718108.failure.txt:

1>UNHANDLED EXCEPTIONS FROM PROCESS 28480:

1>=====================

1>5/20/2024 7:22:26 PM

1>System.IO.IOException: Insufficient system resources exist to complete the requested service.

1>

1>   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)

1>   at System.IO.Pipes.PipeStream.BeginWriteCore(Byte[] buffer, Int32 offset, Int32 count, AsyncCallback callback, Object state)

1>   at System.IO.Pipes.PipeStream.WriteCore(Byte[] buffer, Int32 offset, Int32 count)

1>   at Microsoft.Build.BackEnd.NodeEndpointOutOfProcBase.RunReadLoop(Stream localReadPipe, Stream localWritePipe, ConcurrentQueue`1 localPacketQueue, AutoResetEvent localPacketAvailable, AutoResetEvent localTerminatePacketPump)

1>===================
....

I'm not sure if this problem is merely related to resources, cause CPU and RAM usage never hit the limits.
I tried to stop some Event Trace Sessions in the Performance Monitoring window but it didn't help.
Do you have any suggestions?

Note that I can build the solution successfully from Build -> Build Solution. The problem occurs when I try to Create App Packages...

Machine's configurations:
Processor: 13th Gen Intel(R) Core(TM) i7-13650HX 2.60 GHz - 14 cores, 20 logical processors RAM: 32.0 GB
OS: Windows 11 Home

Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
4,726 questions
C++
C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
3,572 questions
0 comments No comments
{count} votes

Accepted answer
  1. Michael Taylor 49,261 Reputation points
    2024-05-20T18:52:00.6533333+00:00

    This is a low-level MSBuid error that you shouldn't be seeing. Without any insight into what is going on my gut instinct is that the named pipe MSBuild is using to communicate with the external tool being called at the time is failing. There may be a workaround but without knowing where the failure is I don't know how to diagnose it.

    The MSBuild team is interested in all these situations as they should be handling them and bubbling up more useful messages. I recommend that you post the issue to their Github page with as much info as you can provide. They will undoubtedly need some repo steps but can often do that privately so they can diagnose what is going wrong.

    In the interim I might recommend turning on diagnostic level debugging in MSBuild and getting the entire error log and see exactly where it is failing and if there are any related errors.

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful