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

后端 未结 9 1086
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:31

    I had this kind of issue where I had reverted from a target .NET Framework version of 4.5.2 to 4.0.

    Classes in my App_Code folder had methods that called methods in other classes in that folder. When I created a standard folder I named "AppCode", and moved my classes into it, I no longer had the issue.

    If I re-created the "App_Code" folder and move my classes back into it, I will have this issue again. I'm convinced it has to do with my .NET Framework version or that Visual Studio just doesn't deal well with changing it after being initially built/targeted to another version.

提交回复
热议问题