How to fix “namespace x already contains a definition for x” error? Happened after converting to VS2010

后端 未结 29 1448
深忆病人
深忆病人 2020-12-04 23:10

Specifically the error occurs in the Resources.Designer.cs:

Error 2 The namespace \'ModulusFE\' already contains a definition for \'Sto

29条回答
  •  误落风尘
    2020-12-04 23:51

    when you have tried everything else and still get the same trouble, there is a way out; however it will be tedious and need careful preparation.

    Start another new project using existing files, or edit the project .csproj file if you are proficient in editing csproj (need backup). I will list steps for new project.

    1. preparation:
      • note all references and their sources
      • note all included files from another project
    2. rename the orginal projectname.csproj file
    3. close solution/project
    4. start new project using existing files(you will get errors from references)
    5. add back the noted references
    6. include/add existing file from other project(s)

提交回复
热议问题