﻿<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>StrataFrame Forum » Updates and Information » Developer Blog Topics  » Windows 7, Visual Studio 2008, and Embedded Resources producing compile time errors.</title><generator>InstantForum 2017-1 Final</generator><description>StrataFrame Forum</description><link>http://forum.strataframe.net/</link><webMaster>StrataFrame Forum</webMaster><lastBuildDate>Tue, 19 May 2026 14:09:16 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: Windows 7, Visual Studio 2008, and Embedded Resources producing compile time errors.</title><link>http://forum.strataframe.net/FindPost27036.aspx</link><description>I thought I would add another link from Ivan Borges that also dealt with a similar issue with a different solution.  Hope this helps :)&lt;br&gt;
&lt;br&gt;
[url=http://support.microsoft.com/kb/814675/en-us]http://support.microsoft.com/kb/814675/en-us[/url]</description><pubDate>Thu, 29 Apr 2010 16:09:56 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>Windows 7, Visual Studio 2008, and Embedded Resources producing compile time errors.</title><link>http://forum.strataframe.net/FindPost25031.aspx</link><description>Like many of you, we are beginning to migrate some of the development machines in house over to Windows 7.&amp;nbsp; Like any migration, there are always things that come up and cause frustration.&amp;nbsp; The first one for me...a generic GDI+ error when compiling.&amp;nbsp; This one took me by surprise (the resolution anyway) as it had to do with pre-existing embedded resources.&amp;nbsp; Here is the error:&lt;P&gt;&lt;FONT size=1&gt;[quote]Error&amp;nbsp;&amp;nbsp;&amp;nbsp; 19&amp;nbsp;&amp;nbsp;&amp;nbsp; The "GenerateResource" task failed unexpectedly.&lt;BR&gt;System.Runtime.InteropServices.ExternalException: A generic error occurred in GDI+.&lt;BR&gt;at System.Drawing.Image.Save(Stream stream, ImageCodecInfo encoder, EncoderParameters encoderParams)&lt;BR&gt;at System.Drawing.Image.Save(MemoryStream stream)&lt;BR&gt;at System.Drawing.Image.System.Runtime.Serialization.ISerializable.GetObjectData(SerializationInfo si, StreamingContext context)&lt;BR&gt;at System.Runtime.Serialization.Formatters.Binary.WriteObjectInfo.InitSerialize(Object obj, ISurrogateSelector surrogateSelector, StreamingContext context, SerObjectInfoInit serObjectInfoInit, IFormatterConverter converter, ObjectWriter objectWriter)&lt;BR&gt;at System.Runtime.Serialization.Formatters.Binary.WriteObjectInfo.Serialize(Object obj, ISurrogateSelector surrogateSelector, StreamingContext context, SerObjectInfoInit serObjectInfoInit, IFormatterConverter converter, ObjectWriter objectWriter)&lt;BR&gt;at System.Runtime.Serialization.Formatters.Binary.ObjectWriter.Serialize(Object graph, Header[] inHeaders, __BinaryWriter serWriter, Boolean fCheck)&lt;BR&gt;at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Serialize(Stream serializationStream, Object graph, Header[] headers, Boolean fCheck)&lt;BR&gt;at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Serialize(Stream serializationStream, Object graph)&lt;BR&gt;at System.Resources.ResourceWriter.WriteValue(ResourceTypeCode typeCode, Object value, BinaryWriter writer, IFormatter objFormatter)&lt;BR&gt;at System.Resources.ResourceWriter.Generate()&lt;BR&gt;at System.Resources.ResourceWriter.Dispose(Boolean disposing)&lt;BR&gt;at System.Resources.ResourceWriter.Close()&lt;BR&gt;at Microsoft.Build.Tasks.ProcessResourceFiles.WriteResources(IResourceWriter writer)&lt;BR&gt;at Microsoft.Build.Tasks.ProcessResourceFiles.WriteResources(String filename)&lt;BR&gt;at Microsoft.Build.Tasks.ProcessResourceFiles.ProcessFile(String inFile, String outFile)&lt;BR&gt;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)&lt;BR&gt;at Microsoft.Build.Tasks.GenerateResource.Execute()[/quote]&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Resolution:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;This was a bit frustrating, but in this example, it was because the offending image in the resource was a JPG instead of a PNG.&amp;nbsp; 9 times out of 10 we use a PNG image anyway, but in this example, converting the offending image into a PNG then rebuilding the solution resolved the issue.&lt;/P&gt;&lt;P&gt;There is another issue that can come from this as well (per my research).&amp;nbsp; If you have an image that is larger than 64K, this can possible creep up as well.&lt;/P&gt;&lt;P&gt;Hope this helps! :)</description><pubDate>Thu, 29 Apr 2010 16:09:56 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item></channel></rss>