Forum Cross Platform with Xamarin

The name 'InitializeComponent' does not exist in the current context in PCl Project

I'm facing this problem to my PCL project for all the xmal files.
Kindly guide me to settle this issue.


  • FabioCozzolinoFabioCozzolino ITBeta, University ✭✭✭

    ensure that the .xaml file Build Action is EmbeddedResource and Custom Tool is MSBuild:UpdateDesignTimeXaml.


  • EruthiaRajEruthiaRaj USMember

    Hi Fabio,
    Thanks for the reply. Currently, all my xmal files have the setting you have mentioned above. But still the error occured.

  • ravensorbravensorb USMember ✭✭

    This is a LONG standing bug that still has no resolution. If your curious, here is a link to the bug.

  • EruthiaRajEruthiaRaj USMember

    If I create new project and create all xmal as new, the error disappeared. Get fed-up.

  • MarceloVieiraMarceloVieira USMember ✭✭

    the workaround the problem is related to the Fabio Cozzolino said. We also need to clean the Solution to ensure that the OBJ files are recreated without problems.

    Good luck to all!

  • EruthiaRajEruthiaRaj USMember

    As workaround, i just simply creat a xmal file everytime if i encounted this issue.

  • kwlkwl USInsider, Developer Group Leader ✭✭

    Excluding the XAML file, re-including it, and setting the properties described by @FabioCozzolino worked for me.

Sign In or Register to comment.