Step 1: get more info
If you run across this error, hopefully, you will also run across a post from Jonathan Pryor replying to someone else with the same problem. The suggestion is to turn on more verbose logging from MSBuild to see if you get something useful out of those messages.
In the Visual Studio Options dialog, go to "Projects and Solutions" then "Build and Run". Switch the "MSBuild project build output verbosity" from "Minimal" to "Normal" and build your project again. After doing so, I got this message which was far more helpful. Apparently, resources cannot include anything but letters, numbers, periods, and underscores ([a-z0-9_.]
).
Solution
Rename file within the required restrictions and build again.
While this error message may come up for far more situations than filename restriction issues, a filename change fixed this particular issue completely.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…