C#RESX文件错误 [英] C# resx file error
问题描述
我得到一个奇怪的错误与我的.resx文件:
无效的ResX文件的ResX输入无效找不到有效的。对于resheader标签在的ResX读写器类型名称C:\Documents和Settings\Users\My Documents\Visual工作室2010\Projects\dock\WinForms\Dock\strings.resx
我所做的就是取代现有的VS 2010解决方案与VS 2008解决方案的一些旧的一些文件,大部分文件的正常工作,但我得到这个错误,我不知道如何要修复它。如果它的确与众不同,这里是该文件的源代码。
我用NET的WinForms 4.0,如果该事项。
< resheader NAME =resmimetype>
< VALUE>
文本/微软RESX
< /值>
< / resheader>
多余的空白得到了某种程度上说。你将需要删除它,所以它看起来是这样的:
< resheader NAME =resmimetype>
<价值>文字/微软RESX< /值>
< / resheader>
您还必须更新程序集引用的版本号从2.0.0.0 4.0.0.0到。复制.resx文件是这样,否则是要惹麻烦的好方法。当设计师生成的代码试图使用.resx文件丢失的你会很容易得到织补的白色屏幕。
I'm getting a weird error with my .resx files:
"Invalid Resx file. ResX input is not valid. Cannot find valid "resheader" tags for the ResX reader and writer type names. C:\Documents and Settings\Users\My Documents\Visual Studio 2010\Projects\dock\WinForms\Dock\strings.resx"
What I did was replace some files in an existing VS 2010 solution with some older ones from VS 2008 solution, most of the files work fine but I get this error and I don't know how to fix it. If it makes a difference, here is the source code of that file.
I'm using NET WinForms 4.0, if that matters.
<resheader name="resmimetype">
<value>
text/microsoft-resx
</value>
</resheader>
Extra white space got added somehow. You'll need to remove it so it looks like this:
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
You also must update the version numbers in the assembly references from 2.0.0.0 to 4.0.0.0. Copying .resx files like this is otherwise a good way to get into trouble. You'll easily get the White Screen of Darn when the designer generated code tries to use a missing value in the .resx file.
这篇关于C#RESX文件错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!