linkdotnet / BlogExamples

Contains all of my examples from various blog posts
MIT License
112 stars 20 forks source link

Cannot build Android ToDoApp #1

Open ttustonic opened 2 years ago

ttustonic commented 2 years ago

Hello I'm trying to build Todo app sample, but it doesn't work. I get multiple errors, all in Swimlane.xaml.cs and in generated Swimlane.g.cs code. I tried with VS 2019 and VS 2022, both on the same machine. Does Android app work? UWP works fine, and I didn't try others. Errors are attached.

Thanks, Tom

errors.txt

linkdotnet commented 2 years ago

Hmmm. I could partially reproduce the behavior. To be honest, I did not try it on Android, but the Drag and Drop capabilities should work anyway according to the Uno Platform page.

What happens if you rebuild the whole solution? That worked for me at least. But I have to dive a bit deeper to understand what is the exact problem. Might be an issue with the source code generator shipped with Uno.

ttustonic commented 2 years ago

Hello I can build Droid app when I set full name for DragEventArgs: private async void DropItem(object sender, Windows.UI.Xaml.DragEventArgs e) and private void SetDragOverIcon(object sender, Windows.UI.Xaml.DragEventArgs e)

However, Add todo button doesn't work with Android emulator. It might be related to this: https://github.com/unoplatform/uno/issues/1776

linkdotnet commented 2 years ago

Hmm that seems really weird, but thanks for investigating. It is especially weird because the Swimlane defines it already as namespace. I feel like something wrong with the source code generators they are using. One could try the code with the newer dotnet6 template.