Ambiguous references with the exact same namespace

前端 未结 11 2084
余生分开走
余生分开走 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 19:08

    For me it was because I had referenced the DLL both by Project reference and Assembly reference. Deleting the Assembly reference fixed the issue.

    0 讨论(0)
  • 2020-12-30 19:09

    I had the same problem. I use ReSharper. The solution to my problem was not cleaning the solution but deleting the suo-file. Hope that helps.

    0 讨论(0)
  • 2020-12-30 19:16

    As for the reference of any future users: This thread covers four answers whereas two are in the comments. I have faced the issue several times, three of these answers have helped me in the past, so if you face the same issue, try any of these:

    • Clean and/or Rebuild the Solution then reanalyze the files in Resharper.
    • Restart Visual Studio then reanalyze
    • Delete the bin/ folder then reanalyze
    • (Apparently deleting the suo-file can help, too, although I never had to do that and can't understand how it should help)
    • A combination of the three above.

    (This is not really a new answer, it is more of a comment on the variety of answers and comments found - it is a community wiki so feel free to adapt it if necessary)

    0 讨论(0)
  • 2020-12-30 19:16

    I had this problem and also ReSharper installed on visual studio.

    Print screen 1

    Print screen 2

    I open bug ticket on ReSharper tracker and the development team advised me to do:

    Solution:

    This problem can be solved by removing the Solution User Options (.Suo) File. This file is stored in the project root but is hidden. you need to check Folder Options-> View-> Show hidden files, folders, drives. and you need to close visual studio if you have open this project because is used by visual studio.

    0 讨论(0)
  • 2020-12-30 19:21

    The .dll was already in my /bin folder.

    When I deleted it, it got rid of this error.

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