<p>When attempting to compile my C# project, I get the following error:</p>

<pre><code>'C:\Documents and Settings\Dan\Desktop\Rowdy Pixel\Apps\CleanerMenu\CleanerMenu\obj\Debug\CSC97.tmp' is not a valid Win32 resource file.
</code></pre>

<p>Having gone through many Google searches, I have determined that this is usually caused by a 256x256 image inside an icon used by the project. I've gone through all the icons and removed the 256x256 versions, but the error persists. Any ideas on how to get rid of this?</p>

<hr>

<p>@Mike: It showed up mysteriously one night. I've searched the csproj file, but there's no mention of a CSC97.tmp (I also checked the solution file, but I had no luck there either). In case it helps, I've posted the <a href="http://pastebin.com/mcd2607b" rel="noreferrer">contents of the csproj file on pastebin</a>.</p>

<p>@Derek: No problem. Here's the compiler output.</p>

<pre><code>------ Build started: Project: Infralution.Licensing, Configuration: Debug Any CPU ------
Infralution.Licensing -&gt; C:\Documents and Settings\Dan\Desktop\Rowdy Pixel\Apps\CleanerMenu\Infralution.Licensing\bin\Debug\Infralution.Licensing.dll
------ Build started: Project: CleanerMenu, Configuration: Debug Any CPU ------
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Csc.exe /noconfig /nowarn:1701,1702 /errorreport:prompt /warn:4 /define:DEBUG;TRACE /main:CleanerMenu.Program /reference:"C:\Documents and Settings\Dan\Desktop\Rowdy Pixel\Apps\CleanerMenu\Infralution.Licensing\bin\Debug\Infralution.Licensing.dll" /reference:..\NotificationBar.dll /reference:..\PSTaskDialog.dll /reference:C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Data.dll /reference:C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.dll /reference:C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Drawing.dll /reference:C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Windows.Forms.dll /reference:C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Xml.dll /reference:obj\Debug\Interop.IWshRuntimeLibrary.dll /debug+ /debug:full /optimize- /out:obj\Debug\CleanerMenu.exe /resource:obj\Debug\CleanerMenu.Form1.resources /resource:obj\Debug\CleanerMenu.frmAbout.resources /resource:obj\Debug\CleanerMenu.ModalProgressWindow.resources /resource:obj\Debug\CleanerMenu.Properties.Resources.resources /resource:obj\Debug\CleanerMenu.ShortcutPropertiesViewer.resources /resource:obj\Debug\CleanerMenu.LocalizedStrings.resources /resource:obj\Debug\CleanerMenu.UpdatedLicenseForm.resources /target:winexe /win32icon:CleanerMenu.ico ErrorHandler.cs Form1.cs Form1.Designer.cs frmAbout.cs frmAbout.Designer.cs Licensing.cs ModalProgressWindow.cs ModalProgressWindow.Designer.cs Program.cs Properties\AssemblyInfo.cs Properties\Resources.Designer.cs Properties\Settings.Designer.cs Scanner.cs ShortcutPropertiesViewer.cs ShortcutPropertiesViewer.Designer.cs LocalizedStrings.Designer.cs UpdatedLicenseForm.cs UpdatedLicenseForm.Designer.cs
error CS1583: 'C:\Documents and Settings\Dan\Desktop\Rowdy Pixel\Apps\CleanerMenu\CleanerMenu\obj\Debug\CSC97.tmp' is not a valid Win32 resource file

Compile complete -- 1 errors, 0 warnings
------ Skipped Build: Project: CleanerMenu Installer, Configuration: Debug ------
Project not selected to build for this solution configuration 
========== Build: 1 succeeded or up-to-date, 1 failed, 1 skipped ==========
</code></pre>

<p>I have also uploaded the icon I am using. You can <a href="http://rowdypixel.com/tmp/CleanerMenu.ico" rel="noreferrer">view it here.</a></p>

<hr>

<p>@Mike: Thanks! After removing everything but the 32x32 image, everything worked great. Now I can go back and add the other sizes one-by-one to see which one is causing me grief. :)</p>

<p>@Derek: Since I first got the error, I'd done a complete reinstall of Windows (and along with it, the SDK.) It wasn't the main reason for the reinstall, but I had a slim hope that it would fix the problem.</p>

<p>Now if only I can figure out why it previously worked with all the other sizes...</p>

[{'answer_id': 6977, 'author': 'Mike Stone', 'author_id': 122, 'author_profile': 'https://Stackoverflow.com/users/122', 'pm_score': 0, 'selected': False, 'text': '<p>Is this a file you created and added to the project or did it mysteriously show up?</p>\n\n<p>You can maybe check your .csproj file and see how it is being referenced (it should be a simple xml file and you can search for CSC97.tmp).</p>\n\n<p>Perhaps post the information you find so we can have more details to help solve your problem</p>\n'}, {'answer_id': 6985, 'author': 'Derek Park', 'author_id': 872, 'author_profile': 'https://Stackoverflow.com/users/872', 'pm_score': 0, 'selected': False, 'text': "<p>Looking around, it seems some people resolved this by repairing or reinstalling the .NET SDK.  You might want to give that a try.</p>\n\n<p>P.S. I see why you didn't include more of the compiler output, now.  Not much to really see there.  :)</p>\n"}, {'answer_id': 6987, 'author': 'Mike Stone', 'author_id': 122, 'author_profile': 'https://Stackoverflow.com/users/122', 'pm_score': 4, 'selected': True, 'text': '<p>I don\'t know if this will help, but from <a href="http://forums.msdn.microsoft.com/en-US/csharplanguage/thread/4217bec6-ea65-465f-8510-757558b36094/" rel="noreferrer">this forum</a>:</p>\n\n<blockquote>\n  <p>Add an .ico file to the application section of the properties page, and recieved the error thats been described, when I checked the Icon file with an icon editor, it turn out that the file had more than one version of the image ie (16 x 16, 24 x 24, 32 x 32, 48 x 48 vista compressed), I removed the other formats that I didnt want resaved the file (just with 32x 32) and the application now compiles without error.</p>\n</blockquote>\n\n<p>Try opening the icon in an icon editor and see if you see other formats like described (also, try removing the icon and seeing if the project will build again, just to verify the icon is causing it).</p>\n'}, {'answer_id': 13570002, 'author': 'meddlingwithfire', 'author_id': 682608, 'author_profile': 'https://Stackoverflow.com/users/682608', 'pm_score': 3, 'selected': False, 'text': '<p>I had a similar issue with an "obj/debug/<strong>*</strong>.tmp" file erroring out in my build log.  Turns out my C:\\ drive was out of space.  After clearing some space, my builds started working.</p>\n'}, {'answer_id': 63431451, 'author': 'Mgeeb', 'author_id': 13784305, 'author_profile': 'https://Stackoverflow.com/users/13784305', 'pm_score': 0, 'selected': False, 'text': '<p>In the project properties, Application tap:\nIn the Resources group just select Icon and manifest radio button.\nin my project that was the problem and fixed with above steps.</p>\n'}]
['https://Stackoverflow.com/questions/6973', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/752/']