问题
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:
...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:
...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:
I'm a little surprised that you can have the $ sign in the resource name.
来源:https://stackoverflow.com/questions/19500069/how-can-i-fix-my-invalid-resx-file-input