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

后端 未结 29 1449
深忆病人
深忆病人 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:44

    This is an old question but I didn't find the fix I used, so I've added it here.

    In my case it was a namespace with the same name as a class in the parent namespace.

    To find this, I used the object browser and searched for the name of the item that was already defined.

    If it won't let you do this while you still have the error then temporarily change the name of the item it is complaining about and then find the offending item.

提交回复
热议问题