Results 1 to 6 of 6

Thread: The "GenerateResource" task failed unexpectedly

  1. #1
    New Member
    Join Date
    Apr 11
    Posts
    7

    The "GenerateResource" task failed unexpectedly

    Hello .I working on a project.
    Every time i add an image at the "resourses" folder
    of my project,and i try to start debugging it i have
    to cope with this error:

    The "GenerateResource" 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.Write(Byte[] buffer, Int32 offset, Int32 count)
    at System.IO.BinaryWriter.Write(Byte[] buffer, Int32 index, Int32 count)
    at System.Resources.ResourceWriter.WriteValue(ResourceTypeCode typeCode, Object value, BinaryWriter writer, IFormatter objFormatter)
    at System.Resources.ResourceWriter.Generate()
    at System.Resources.ResourceWriter.Dispose(Boolean disposing)
    at System.Resources.ResourceWriter.Close()
    at Microsoft.Build.Tasks.ProcessResourceFiles.WriteResources(IResourceWriter writer)
    at Microsoft.Build.Tasks.ProcessResourceFiles.WriteResources(String filename)
    at Microsoft.Build.Tasks.ProcessResourceFiles.ProcessFile(String inFile, String outFile)
    at Microsoft.Build.Tasks.ProcessResourceFiles.Run(TaskLoggingHelper log, ITaskItem[] assemblyFilesList, ArrayList inputs, ArrayList outputs, Boolean sourcePath, String language, String namespacename, String resourcesNamespace, String filename, String classname, Boolean publicClass)
    at Microsoft.Build.Tasks.GenerateResource.Execute()
    at Microsoft.Build.BuildEngine.TaskEngine.ExecuteInstantiatedTask(EngineProxy engineProxy, ItemBucket bucket, TaskExecutionMode howToExecuteTask, ITask task, Boolean& taskResult)

    Does anyone know something about this error?
    Thank's for help

  2. #2
    PowerPoster dunfiddlin's Avatar
    Join Date
    Jun 12
    Posts
    5,501

    Re: The "GenerateResource" task failed unexpectedly

    Any image? Any format?

  3. #3
    New Member
    Join Date
    Apr 11
    Posts
    7

    Re: The "GenerateResource" task failed unexpectedly

    The resourses folder so far contains 774 images in jpg format and every new images,in jpg format i try to add
    i face this error.

  4. #4
    PowerPoster dunfiddlin's Avatar
    Join Date
    Jun 12
    Posts
    5,501

    Re: The "GenerateResource" task failed unexpectedly

    774? I don't think it really needs explaining why you're getting 'out of memory' errors then, especially if they are not optimised .jpg files.

  5. #5
    New Member
    Join Date
    Apr 11
    Posts
    7

    Re: The "GenerateResource" task failed unexpectedly

    I create a series of games with motion images and i wand all these images being hidden.The only way to hide these images is to place them at the "Resources" folder of my project.Is there any solution to encounter this error?

  6. #6
    PowerPoster dunfiddlin's Avatar
    Join Date
    Jun 12
    Posts
    5,501

    Re: The "GenerateResource" task failed unexpectedly

    Use more than one resource file. You don't have to cram everything into one!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •