Environment:
We have a desktop application which plays a video. This video is part of a project and the project is packaged into the installer. Every once in a while building the installer project shows this error message:
Not enough storage is available to complete this operation
If I restart Visual Studio it works.
Is there a way to avoid this? Is there a better way to package videos in an installer?
If you get the "Insufficient Storage Available" error, empty your app cache to see if that clears up enough working space for the installation.
You might be experiencing low disk storage issues because of large files that are hidden somewhere on your PC. Windows offers several ways to delete unwanted software, but it may be hard for you to locate some programs manually.
This usually happens when the build process needs a lot of RAM memory and cannot get it. Since restarting Visual Studio fixes the problem, most likely it also your case.
Try closing some of the running applications. You can also try adding more RAM to your machine or increasing the page file.
I came across this question when trying to compile my C# solution in Visual Studio 2010 in Windows XP. One project had a fair number of embedded resources in (the size of the resultant assembly was ~140MiB) and I couldn't compile the solution because I was getting the
Not enough storage is available to complete this operation
error in my build output.
None of the answers on this question helped, but I did find an answer to "Not enough storage is available to complete this operation" by ScottBurton42 on social.msdn.microsoft.com. It suggests adding the 3GB
switch to the Boot.ini
file, and making devenv.exe
large-address aware. Adding the 3GB
switch to my Boot.ini
file was what worked for me (I think devenv.exe
for Visual Studio 2010 and above is already large-address aware).
My answer is based on that answer.
Solution 1: Set the /3GB
Boot.ini
switch
The page Memory Support and Windows Operating Systems on MSDN says:
The virtual address space of processes and applications is still limited to 2 GB unless the
/3GB
switch is used in theBoot.ini
file.The
/3GB
switch allocates 3 GB of virtual address space to an application that usesIMAGE_FILE_LARGE_ADDRESS_AWARE
in the process header. This switch allows applications to address 1 GB of additional virtual address space above 2 GB.The virtual address space of processes and applications is still limited to 2 GB, unless the
/3GB
switch is used in theBoot.ini file
. The following example shows how to add the /3GB parameter in theBoot.ini
file to enable application memory tuning:[boot loader] timeout=30 default=multi(0)disk(0)rdisk(0)partition(2)\WINNT [operating systems] multi(0)disk(0)rdisk(0)partition(2)\WINNT="????" /3GB
Note "
????
" in the previous example is be the programmatic name of the operating system.
In Windows XP, the Boot.ini
file can be modified by going to
The page on the /3GB
switch on MSDN says:
On 32-bit versions of Windows, the
/3GB
parameter enables 4 GT RAM Tuning, a feature that enlarges the user-mode virtual address space to 3 GB and restricts the kernel-mode components to the remaining 1 GB.The
/3GB
parameter is supported on Windows Server 2003, Windows XP, and Windows 2000. On Windows Vista and later versions of Windows, use theIncreaseUserVA
element inBCDEdit
.
Restarting the machine will then cause the setting to take effect.
Solution 2: Make devenv.exe
large address aware:
Open up a Visual Studio Command Prompt (or a Developer Command Prompt, depending on the version of Visual Studio)
Type and execute the following command line:
editbin /LARGEADDRESSAWARE {path}\devenv.exe`
where {path}
is the path to devenv.exe
(you can find this by going to the properties of the Visual Studio shortcut).
This will allow devenv.exe
to access 3GB of memory instead of 2GB.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With