Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issues with the guide "ToDo List app" #58

Open
Biepa opened this issue Aug 20, 2023 · 10 comments
Open

Issues with the guide "ToDo List app" #58

Biepa opened this issue Aug 20, 2023 · 10 comments
Assignees
Labels
bug Something isn't working

Comments

@Biepa
Copy link

Biepa commented Aug 20, 2023

Describe the bug
I'm new to Avalonia and MVVM, so I wanted to take one of the tutorials to get easily started. But the guide is not matching with the current Avalonia version in terms of stuff looking different in Visual Studio and on the guide.

To Reproduce
Steps to reproduce the behavior:

  1. Follow this guide step by step: https://docs.avaloniaui.net/docs/next/tutorials/todo-list-app/

Expected behavior
A beginners guide is most useful when it can be followed 100% the experience described. Please let someone knowledgable go through it and fix the issues coming up in the documentation.

Screenshots

Issue 1

As an example I adjusted my content like shown here:
https://docs.avaloniaui.net/docs/next/tutorials/todo-list-app/main-window-content
grafik
But getting an error of "Unable to resolve type MainWindowViewModel from namespace using:ToDoList.ViewModels Line 13, position 6"
As correctly the "MainWindowViewModel" is not created it seems.
grafik

Issue 2

Here is written "Locate the Models folder": https://docs.avaloniaui.net/docs/next/tutorials/todo-list-app/creating-a-model
Which is not created by default.

Same issue here: https://docs.avaloniaui.net/docs/next/tutorials/todo-list-app/creating-a-view-model#view-model-to-model-dependency
As "MainWindowViewModel" is not existing

This leads to other issues later on following the guide.

Desktop (please complete the following information):

  • OS: Windows
  • Version Avalonia for Visual Studio 11.1

Additional context
For me as beginner it's hard to get into Avalonia and MVVM programming when the basic tutorial is not working. As I'm confused by the missing MainWindowViewModel and other stuff. I solved some if it by looking at other tutorials but that's not the intention of a tutorial for new users.
Sure it's an additional learning oportunity, but I would like to understand the basics first before I start debugging it.

Thanks you

@Biepa Biepa added the bug Something isn't working label Aug 20, 2023
@timunie
Copy link
Collaborator

timunie commented Aug 21, 2023

Hi @Biepa and welcome,

... yeah we had a huge release a few weeks ago which changed just a lot. I need to work on this sample to update it. It's on my list, but as I have to do it after my "normal" job it takes some time. Sorry for the inconvenience 🙈 .

Meanwhile please also explore: https://github.com/AvaloniaUI/Avalonia.Samples It's already up to date.

also feel free to join out telegram community chat: https://t.me/Avalonia

Note: I'll move this issue into Avalonia.Samples as this is where it belongs to. Stay tuned :-)

Happy coding
Tim

@timunie timunie transferred this issue from AvaloniaUI/Avalonia Aug 21, 2023
@timunie timunie self-assigned this Aug 21, 2023
@Biepa
Copy link
Author

Biepa commented Aug 22, 2023

Hey @timunie,
Thank you very much for your reponse.
I will have a look at the samples in the meanwhile 👍

@Biepa
Copy link
Author

Biepa commented Aug 29, 2023

Hey @timunie,
The api reference is also in the "pre-release" state. Is that correct?
So it's "Avalonia.Samples" or the "Avalonia" repos that can be taken as a reference, correct?

@timunie
Copy link
Collaborator

timunie commented Aug 29, 2023

yeah the reference docs are only 0.10.x and not for 11.0 as we didn't find a good solution for it work yet. Afaik it should be back to life at a certain point, but hasn't high priority. Tbh, we think the source is much more useful then the reference API

@Biepa
Copy link
Author

Biepa commented Aug 29, 2023

Thanks for the fast reply.
I will give it a shot with the source. Though it's quite hard for a beginner not to have some examples.
If that doesn't work out I may join the Telegram and ask some questions 😅

If it could be noted on the reference API and the v11 docs that it's not up to date it could save other users time and frustration.

@BlueJay2022
Copy link

Similar issue
Just starting, and on macOS, MainViewModel.cs was not in the folders created by dotnet new

@timunie
Copy link
Collaborator

timunie commented Dec 11, 2023

@BlueJay2022 can you specify more? Which IDE, which Avalonia-Template version? Which kind of Template did you used?

@BlueJay2022
Copy link

BlueJay2022 commented Dec 11, 2023 via email

@timunie
Copy link
Collaborator

timunie commented Dec 12, 2023

I remember issues with Mac M2 but I have no mac to test. What I can tell you is however, that you should use the MVVM template if you want to have a MainViewModel creaded:

dotnet new avalonia.mvvm -o BasicMvvmSample
cd BasicMvvmSample

(https://github.com/AvaloniaUI/Avalonia.Samples/tree/main/src/Avalonia.Samples/MVVM/BasicMvvmSample#command-line)

@pghezzo
Copy link

pghezzo commented Mar 23, 2024

I have been able to follow the guide up to https://docs.avaloniaui.net/docs/tutorials/todo-list-app/navigate-views but not luck afterwards.
I am stuck at this point where I don't understand why the Content is not being rendered.
image
I'll pivot to the samples in the meantime.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants