问题描述
我将几个现有文件(来自VS 2008 Windows CE项目)添加到了VS 2008 Winforms项目中.对于许多(但不是全部)表格,我得到以下错误信息:* .resx文件:
I added several existing files (from a VS 2008 Windows CE project) to a VS 2008 Winforms project. For many (but not all) of the forms, I get this err re: the *.resx files:
无效的Resx文件. ResX输入无效.无法为ResX读取器和写入器类型名称找到有效的"resheader"标签.
可以很好地显示* .resx文件,就像我在解决方案资源管理器中2单击它们时一样:
The *.resx files that are fine display like so when I 2-click them in the Solution Explorer:
...而如果我用2单击解决方案资源管理器中的* .resx文件以显示以下内容,则那些无法使用上述err msg进行编译的文件将显示一件事:
...whereas those that won't compile with the err msg above display one thing if I 2-click the *.resx file in the Solution Explorer, to wit:
...但是如果我2单击错误列表中的行,则调用错误的* .resx文件会显示其代码,如下所示:
...but the error-invoking *.resx files show their code if I 2-click the line in the Error List, like so:
. . .
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
. . .
注意:此处的解决方案 C#resx文件错误:似乎没有适用于我的情况,因为离板/脱轨文件已经具有以下格式:
Note: The solution here C# resx file error: doesn't seem to apply to my situation, as the out-of-kilter / off-the-rails files already have this format:
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
为什么有些resx文件没问题,而另一些阻止编译?我如何按摩/调整它们以使其越过编译手套?
Why are some resx files fine while the others prevent compilation? How can I massage/tweak them to get past the compile gauntlet?
推荐答案
对于资源名称中带有$号,我感到有些惊讶.
I'm a little surprised that you can have the $ sign in the resource name.
这篇关于如何解决无效的resx文件输入?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!