Warning “The type X in Y.cs conflicts with the imported type X in Z.dll”

后端 未结 9 989
Happy的楠姐
Happy的楠姐 2021-01-03 17:41

The main.cs of my project returns the following warning:

Warning 1 The type \'Extensions.MessageDetails\' in \'PATH\\Extensions.cs\'

9条回答
  •  孤城傲影
    2021-01-03 18:06

    I had this problem with a project that is also hosted on NuGet. I checked all project references. Finally, the object browser revealed that the DLL of an older version of my NuGet package was somehow loaded in Visual Studio from the NuGet cache folder ("C:\Users\{username}\.nuget\packages"). I removed the package from the cache folder, it disappeared from the object browser and everything was working fine again.

提交回复
热议问题