Visual Studio error: The “GenerateResource” task failed unexpectedly … The file exists

后端 未结 6 534
醉话见心
醉话见心 2020-12-17 07:59

I am trying to build a solution with many projects, and I\'m getting this error for a Windows Service project:

The \"GenerateResource\" task failed unexpecte         


        
相关标签:
6条回答
  • 2020-12-17 08:13

    In the more recent versions of Visual Studio it's quick and simple to use the clean and rebuild solution options available on the build toolbox

    0 讨论(0)
  • 2020-12-17 08:16

    Run Visual Studio with as administrator.

    0 讨论(0)
  • 2020-12-17 08:22

    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.

    0 讨论(0)
  • 2020-12-17 08:23

    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.

    0 讨论(0)
  • 2020-12-17 08:29

    in my case I re-opened the same project with VS2013 instead of VS2010, so I successfully rebuild it (it creates a new file (*.v12.suo). Then I back with VS2010 and finally all was ok. Hope this helps

    0 讨论(0)
  • 2020-12-17 08:31

    I had a .resx file that became corrupted. I undid the change & pulled it from source control again to get the original copy restored. That worked for me.

    0 讨论(0)
提交回复
热议问题