Forum Xamarin.Forms

Eventhandler for "clicked" event not found, when the eventhandler is in the c# code

SettingsPage.xaml(168,168): Error XFC0002: EventHandler "SaveBTN_Clicked_1" with correct signature not found in type "Settings". (XFC0002) (VIS2GoStandardlibrary) XamlC

After returning to a project I hadn't checked on for more than a year and sorting out the libraries, I had the project running, then suddenly I got the above error a day later while building. I tried changing the method by autocreating a new handler but I still got the error.


How do i fix this as I need the button and that page to work properly, if you need more info please tell me, I'll try to give as much as is needed.

Answers

  • LeonLuLeonLu Member, Xamarin Team Xamurai

    Please delete SaveBTN_Clicked_1 the in the xaml. Then enter the space,
    Can you get the automatic prompt like belowscreenshot ?

    If so, this issue is still existed, please delete bin and obj folders. then rebuild your project.

  • swodahswodah Member

    The automatic prompt comes up as usual, I even made the method using the automatic "new event handler" choice.

    After I delete bin and obj folders I get an error saying I need to restore nuget for build targets, after restoring I still get the above mentioned error. I tried only deleting the bin and obj folders in the standard library part of the project and in both it and the iOS and android sub projects.

  • LeonLuLeonLu Member, Xamarin Team Xamurai
    edited September 2020

    I cannot reproduce this issue, you can open an support ticket(not free) for this issue https://support.microsoft.com/en-us/supportforbusiness/productselection?sapId=211dd84f-3474-c3c5-79bf-66db630c92a6

Sign In or Register to comment.