The call is ambiguous between the following methods: Identical.NameSpace.InitializeComponent() and Identical.NameSpace.InitializeComponent()

前端 未结 12 1724
野趣味
野趣味 2021-01-17 12:09

Ok, I suspect this might be a Visual Studio thing, but there must be some reason for this. I created from the list of default items a ListBox (Right Click on project, or fol

12条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2021-01-17 12:17

    It appears that you have declared the InitializeComponent method in two places in your class, probably one in each partial class. Try searching in all files for InitializeComponent in Visual Studio and I'm guessing that the results will list two places where it is declared. Delete one and the error will disappear.


    UPDATE >>>

    I'm not sure what kind of answer you're expecting here... clearly, if you didn't add one of those InitializeComponent method definitions, then visual Studio has a bug. I very much doubt that there can be any kind of logical reason for this except that it's a bug.

    UPDATE 2 >>>

    I had a look on the Microsoft Connect website for any existing reported bugs like this but couldn't find any... I've left the link here if you do want to report it to them.

提交回复
热议问题