Visual Studio error: The "GenerateResource" task failed unexpectedly ... The file exists

I figured this out. It seems to have been caused by some files being marked Read Only in the obj/x86 folder.

Lovely how TFS likes to mark files as Read Only.

I deleted the contents of obj/x86 and the error went away.


I checked out (VSS) the obj folder in Solution Explorer and I got a dialog stating that a couple of files and or folders were missing and did I want to create them. I clicked OK and then rebuilt the project without errors.