none
GenerateResource error during project build RRS feed

  • Question

  • Hello,

    I'm working on an old project (.NET 2.0 / 3.5) using WinForm.

    When I try to build the project I have this error:

    Erreur		Échec inattendu de la tâche "GenerateResource".
    System.Runtime.InteropServices.ExternalException (0x80004005): A generic error occurred in GDI+.
       at System.Drawing.Image.Save(Stream stream, ImageCodecInfo encoder, EncoderParameters encoderParams)
       at System.Drawing.Image.Save(MemoryStream stream)
       at System.Drawing.Image.System.Runtime.Serialization.ISerializable.GetObjectData(SerializationInfo si, StreamingContext context)
       at System.Runtime.Serialization.Formatters.Binary.WriteObjectInfo.InitSerialize(Object obj, ISurrogateSelector surrogateSelector, StreamingContext context, SerObjectInfoInit serObjectInfoInit, IFormatterConverter converter, ObjectWriter objectWriter)
       at System.Runtime.Serialization.Formatters.Binary.WriteObjectInfo.Serialize(Object obj, ISurrogateSelector surrogateSelector, StreamingContext context, SerObjectInfoInit serObjectInfoInit, IFormatterConverter converter, ObjectWriter objectWriter)
       at System.Runtime.Serialization.Formatters.Binary.ObjectWriter.Serialize(Object graph, Header[] inHeaders, __BinaryWriter serWriter, Boolean fCheck)
       at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Serialize(Stream serializationStream, Object graph, Header[] headers, Boolean fCheck)
       at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Serialize(Stream serializationStream, Object graph)
       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.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.CommandLine.OutOfProcTaskAppDomainWrapperBase.InstantiateAndExecuteTask(IBuildEngine oopTaskHostNode, LoadedType taskType, String taskName, String taskLocation, String taskFile, Int32 taskLine, Int32 taskColumn, AppDomainSetup appDomainSetup, IDictionary`2 taskParams)	Faurecia.Common			
    

    I'm working on a Windows 10 computer and I'm using Visual Studio 15.

    Do you know how to resolve this error?

    Thanks.

    Monday, May 6, 2019 9:08 AM

All replies

  • Hi macdrien,

    Thank you for posting here.

    For your question, the information you provided could not help to solve this error. Please provide more details.

    1. Which line of the code throw this error?

    2. Try to rebuild this project with .net framework(2.0/3.5). Does it throw the same error?

    3. Does this project works well before? If yes, what do you do to generate this error?

    Best Regards,

    Wendy


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Tuesday, May 7, 2019 2:10 AM
    Moderator