[Tutorials] With the removal of `ViewLocator.cs`, the tutorials can no longer be followed
WillemToorenburgh opened this issue · 1 comments
Hey folks! First timer in the Avalonia world.
Disclosure: I'm an absolute noob and might be missing crucial information.
Issue: I was trying to follow the ToDo tutorial in the docs, using the latest version of the Avalonia library and dotnet new avalonia.mvvm
template (version 0.10.19). when I arrived at the Locating views step. I didn't have a ViewLocator.cs
file in my working directory, so I was rather confused. Looking back at the Creating a new project page, I saw that the directory tree does indeed mention the file. I dug into the change history of the templates and found this merged PR from a month ago. Sadly, there isn't enough information in the PR or the linked issue to tell if this is part of an upcoming new Avalonia version. If so, is there any idea if the docs and tutorials will be updated to match?
Cheers!
I was facing the same issue. Luckily the code is provided in the tutorial for the TODO app (but not for the MusicStore). After creating the file, everything worked as expected. For other first-timers, it would be good if this was clarified.
As far as I'm understanding the discussion in the PR, this ViewLocator implementation was quite limited in functionality and often replaced with something more that has more functionality and is more robust. From that perspective, I can understand this change, but it should be reflected in the tutorials.