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

后端 未结 29 1438
深忆病人
深忆病人 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-05 00:04

    I had a similar issue however found a different solution than what I have read. I came to my fix after reading P Walker's answer.

    My issue happened when I named my resource file for Japanese language incorrectly. Long story short I was trying to create a Resource for Japanese but I accidentally named it localized.jp.resx. I then realized that the iso language code is ja not jp for Japanese. Once I changed the file name to localized.ja.resx and deleted everything that was in the designer file it fixed my problem.

    This is what fixed my problem hopefully it helps someone else.

提交回复
热议问题