Problems with Visual Studio.NET 2003

I’ve normally avoided writing programming related entries on this blog, simply because most people who read my blog really don’t care. I thought I’d post this one on the off chance google will pick it up, because I spent several hours searching for the solution to this problem to no avail.

A couple different times while working on a customer project, I ran into the following compiler error:

error CS1583: ‘C:SVNRootValidChecktrunkValidCheckUIobjDebugCSC298.tmp’ is not a valid Win32 resource file

Not the exact same error, of course, the .tmp file changed each time, but I couldn’t figure out what was causing it. I was able to determine that a few other people had enountered this error message as well, but every solution I found involved checking DLLs or rolling back your code until the problem went away.

The latest time I encountered this error was immediately after I had changed the icon for the application I am developing. That cued me off that this might be some sort of unrecognized resource error. Clearly the error indicates that there is a problem with the resource file, but previously I couldn’t track down anything wrong with the resources, and the given file is a temporary one the compiler generates as it is compiling the .resx files, so it’s tough to figure out what’s causing the problem. This time, I knew it had to be with the icon I had just changed. Sure enough, when I replaced the icon with a dummy icon, the error went away.

The next thing I actually had to do was figure out what was wrong with the icon. I’m using Axialis IconWorkshop, so I opened up the offending icon and took a look. After much trial and error, I found that the largest version of my icon in the .ico file were being compressed. When I removed this option, everything worked file. Axialis indicated that this was a “Vista” option, so I’m not sure how it was checked. Windows itself displayed the icon fine, but apparently this older version of Visual Studio didn’t know what to do with it.

Another thing to note is that I only saw the error message when the problematic icon was set as the application icon (for the whole project), not for an individual window. When I used the icon elsewhere in the app, there wasn’t a problem. This might have been because when I used it for individual windows, it was using the smaller versions of the icon, which weren’t compressed.

Hope this solution gives other developers another thing to check when they run into this error in the future.

5 Responses to “Problems with Visual Studio.NET 2003”

  1. Yoav Z Says:

    Thanks! I had exactly the same problem - an Axialis IconWorkshop icon with Vista image format, with Visual Studio 2005. I removed the Vista format, and it works like a charm…

  2. rmorlok Says:

    Glad the solution worked for someone else!

  3. David Pickett Says:

    Thanks for posting this — you saved me a lot of time and headaches!

  4. rmorlok Says:

    Thanks David, I got your message about the browser incompatibilities. Thanks, I’ll take a look.

  5. flipdoubt Says:

    Same exact issue here. Axialis Workshop, compiles fine on Vista, but not on XP build server running CC.NET. I wonder if it is because the build server uses XP or because it uses the .NET 2.0 SDK rather than VS.NET.

    I would have been lost without this post. Especially the mention of Axialis. Thanks.

Leave a Reply