How can I fix my invalid resx file input?

2019-07-28 16:32发布

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:

Invalid Resx file. ResX input is not valid. Cannot find valid "resheader" tags for the ResX reader and writer type names.

The *.resx files that are fine display like so when I 2-click them in the Solution Explorer:

enter image description here

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

enter image description here

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

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>

Why are some resx files fine while the others prevent compilation? How can I massage/tweak them to get past the compile gauntlet?

1条回答
叼着烟拽天下
2楼-- · 2019-07-28 16:53

I'm a little surprised that you can have the $ sign in the resource name.

查看更多
登录 后发表回答