Search code examples
c#compiler-errorsmauinuget-packagemarkup

CommunityToolkit.Maui.Markup nuget package installs with compilation errors


Freshly installed nuget package in a fresh maui app project and it's missing a field or property called CounterBtn. I don't know what type it's supposed to be.

The name 'CounterBtn' does not exist in the current context

I tried to follow a youtube tutorial of how to use markup instead of xaml for maui.


Solution

  • Turns out it was my own fault. I didn't understand how the xaml.cs script was referencing the xaml parent script, and I had commented out the xaml code for the button.