Ambiguous references with the exact same namespace

前端 未结 11 2164
余生分开走
余生分开走 2020-12-30 18:31

The RC class is not linked to a database, it is a simple class. The class is at only one place and is not partial. The Aérochem.Domain dll project compiles just

11条回答
  •  佛祖请我去吃肉
    2020-12-30 18:56

    I know this is a pretty old issue, but maybe this will help someone. If using c# razor in Asp.Net Core 2+, if you have this problem.

    1) Copy the content of the file to notepad.

    2) Delete the .cshtml file.

    3) Create the .cshtml file with the same name.

    4) Copy the content from notepad into the new file

    I don't know if this is just a weird bug, or a consequence of upgrading a project from Core 1.0 to 2+, but it FINALLY fixed the problem for me. This was an issue for me in both Visual Studio 2017 and 2019.

提交回复
热议问题