Ambiguous references with the exact same namespace

前端 未结 11 2138
余生分开走
余生分开走 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:01

    I had the same problem while two packages were ambiguously referencing the same dll, and this is what worked for me:

    I have given an alias name to one of the packages (named Dapper.StrongName), by putting the following into my .csproj file:

      
        
          
            AliasName
          
        
      
    

    And then added the namespace as using AliasName::Dapper;

    I added a post here: Ambiguous extension methods

    See related articles:

    • extern alias (C# Reference)
    • :: operator (C# Reference)
    • C# 2.0: Using different versions of the same dll in one application

提交回复
热议问题