Resource GDI+ error after upgrade

silverwind
silverwind used Ask the Experts™
on
I have upgraded a VS2008 project to VS2010.  VS2010 is loaded on a different machine.  I copied my VB.NET project's entire folder over to the new machine and VS2010 opened the project after running the upgrade process without a single error.  However, my project has two build errors now that did not appear in VS2008.  "Error while writing the output file 'obj\Release\{myapp}.Resource1.resources' and the 2nd error is "Specific exception: 'ExternalException' Message 'A generic error occurred in GDI+'.  Any idea why my resource file is now causing an issue??

I created a blank project with a blank form and created a new Resource file.  In this resource file I added in the images from the project I upgraded.  The build produced a single error:

Error      1      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.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, List`1 inputs, List`1 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, List`1 inputs, List`1 outputs, Boolean sourcePath, String language, String namespacename, String resourcesNamespace, String filename, String classname, Boolean publicClass)
   at Microsoft.Build.Tasks.GenerateResource.Execute()
   at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
   at Microsoft.Build.BackEnd.TaskBuilder.ExecuteInstantiatedTask(ITaskExecutionHost taskExecutionHost, TaskLoggingContext taskLoggingContext, TaskHost taskHost, ItemBucket bucket, TaskExecutionMode howToExecuteTask, Boolean& taskResult)      Project1
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
I answered my own question.  Once I removed the single .tiff image from the source file and project the build was succesfull.  I read elsewhere that other users upgrading had issues with .tiff resources.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial