Unknown build error, 'Exception of type 'System.OutOfMemoryException' was thrown.' - by Meenakshi_T

Status : 


Sign in
to vote
ID 536358 Comments
Status Active Workarounds
Type Bug Repros 0
Opened 2/25/2010 4:22:42 AM
Access Restriction Public


Error    2    The "ResourcesGenerator" task failed unexpectedly.
System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown.
   at System.IO.MemoryStream.set_Capacity(Int32 value)
   at System.IO.MemoryStream.EnsureCapacity(Int32 value)
   at System.IO.MemoryStream.WriteByte(Byte value)
   at System.IO.BinaryWriter.Write(Byte value)
   at System.Resources.ResourceWriter.Write7BitEncodedInt(BinaryWriter store, Int32 value)
   at System.Resources.ResourceWriter.Generate()
   at System.Resources.ResourceWriter.Dispose(Boolean disposing)
   at Microsoft.Build.Tasks.Windows.ResourcesGenerator.Execute()
   at Microsoft.Build.BuildEngine.TaskEngine.ExecuteInstantiatedTask(EngineProxy engineProxy, ItemBucket bucket, TaskExecutionMode howToExecuteTask, ITask task, Boolean& taskResult)    SilverlightApplication1

Error	42	Unexpected error writing metadata to file 
'C:\Documents and Settings\NEW USER\My Documents\Google Talk Received Files\APP\25FEB2010\WindowsApplication1\obj\Debug\WPF_SATSaNG.exe' 
-- 'Not enough storage is available to complete this operation. '	WPF_SATSaNG
Sign in to post a comment.
Posted by Microsoft on 3/1/2010 at 3:13 PM
Thanks for the bug report. We fixed this after Beta 2 by making the ResourceWriter class use a temp file to store all the values of the resources. So if you have either a large number of resources or resources that use a lot of memory (ie, maybe 100 MB of images), then we will use less memory within VS. We'll have more of a chance of making this scenario work for you.

If that isn't sufficient, you might want to consider whether your resources need to be localizable. If they don't, you can ship them in the same directory with your application, or as embedded manifest resources within your assembly (and use Assembly.GetManifestResourceStream to retrieve them).
Posted by Microsoft on 2/26/2010 at 6:06 AM
Hello Meenakashi
I can't say for sure, as you haven't provided a way for us to reproduce this, but I am fairly confident this has been fixed since Beta 2. Can you please download the RC release and verify?
Posted by Microsoft on 2/25/2010 at 10:03 PM
Thanks for reporting the issue.
In order to fix the issue, we must first reproduce the issue in our labs. We are unable to reproduce the issue with the steps you provided.

Could you please attach a zipped project file to this feedback through our site to help us reproduce the issue?

Thanks again for your efforts and we look forward to hearing from you.
Visual Studio Product Team
Posted by Microsoft on 2/25/2010 at 7:01 PM
Thank you for your feedback, we are currently reviewing the issue you have submitted. If this issue is urgent, please contact support directly(http://support.microsoft.com)