本文介绍了无效的资源文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当试图编译我的C#项目,我收到以下错误:

When attempting to compile my C# project, I get the following error:

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



经过许多谷歌搜索已经走了,我已经确定,这通常是内部的引起的256x256的图像该项目使用的图标。我已经通过所有的图标不见了并删除了256x256的版本,但错误依然存在。 ?如何摆脱这种

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?

@Mike任何想法:它出现了神秘的一个晚上。我搜索了的csproj文件,但没有一个CSC97.tmp提到(我也检查了解决方案文件,但我没有运气有其一)。万一有帮助,我已经张贴上引擎收录上的csproj文件的

I have also uploaded the icon I am using. You can view it here.

@Mike:谢谢!去除一切,但32×32的图像后,一切都很好。现在,我可以回去,并添加其他尺寸一个接一个,看看哪一个是造成我的悲伤。 :)

@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. :)

@Derek:自从我第一次得到了错误,我做的Windows完全重新安装(和与它一起,该SDK)事实并非如此。主要的原因重新安装,但我有一个渺茫的希望,这将解决这个问题。

@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.

现在,如果只有我能弄清楚,为什么它以前与所有其他工作大小...

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

推荐答案

我不知道这是否会帮助,但来自的:

I don't know if this will help, but from this forum:

添加.ico文件到属性页的应用程序部分,并收到错误多数民众赞成被描述的,当我检查与图标编辑器的图标文件时,转出该文件有图像的多个版本,即(16×16 24× 24,32×32 48×48远景压缩),我删除,我没有想重新保存该文件(只是32倍32)和现在的应用程序编译没有错误,其他格式。

尝试在图标编辑器中打开该图标,看看你看其他格式,如描述的(也尝试删除的图标并查看该项目将再次构建,只是为了验证该图标是造成它)。

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).

这篇关于无效的资源文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-24 11:14