Visual studio building error on other computer

0

Once in a while I need to test an application on another computer then the one it is been being developed on. Today when I came to visit a company, I develop the software for, I run into an issue. When I tried to build the solution on their computer the otherwise flawless building process threw an error.

To be concrete:

The "GenerateResource" task failed unexpectedly.
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, SerializationBinder binder)
   at System.Runtime.Serialization.Formatters.Binary.WriteObjectInfo.Serialize(Object obj, ISurrogateSelector surrogateSelector, StreamingContext context, SerObjectInfoInit serObjectInfoInit, IFormatterConverter converter, ObjectWriter objectWriter, SerializationBinder binder)
   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.Dispose()
   at Microsoft.Build.Tasks.ProcessResourceFiles.WriteResources(ReaderInfo reader, IResourceWriter writer)
   at Microsoft.Build.Tasks.ProcessResourceFiles.WriteBinaryResources(ReaderInfo reader, String filename)
   at Microsoft.Build.Tasks.ProcessResourceFiles.WriteResources(ReaderInfo reader, String filename)
   at Microsoft.Build.Tasks.ProcessResourceFiles.ProcessFile(String inFile, String outFileOrDir)
   at Microsoft.Build.Tasks.ProcessResourceFiles.Run(TaskLoggingHelper log, ITaskItem[] assemblyFilesList, List`1 inputs, List`1 satelliteInputs, List`1 outputs, Boolean sourcePath, Boolean usePreserializedResources, String language, String namespacename, String resourcesNamespace, String filename, String classname, Boolean publicClass, Boolean extractingResWFiles, String resWOutputDirectory)
   at Microsoft.Build.Tasks.GenerateResource.Execute()
   at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
   at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext() SpektrometrMain         

Sometimes it suffices to give it a few more tries and the build succeeds. However, the other time it completely breaks the solution, when Windows.Forms designer class announces unreasonable errors such as that some variables missing declarition (while quite obviosly they don't).I am pretty confused about that, since on my computer all projects within the solution build flawlessly. After conducting a short research on google I came across a few advices of which none have helped.

What I have tried:

Cleaning the solution and rebuilding it.

Deleting bin and obj folders and rebuilding the solution.

Removing git source control (also worthy meantioning that this issue ocured shortly after implementing git on companies computer)

Has anyone encountred such a problem or wouln't you have any tips what to look for?

vb.net
visual-studio
build
asked on Stack Overflow May 15, 2021 by Pepa Zdepa

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0