-
Notifications
You must be signed in to change notification settings - Fork 120
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
The first MVVM example has some problems #59
Comments
I got it to work even though there are still two errors. I had to set the startup project as "BasicMvvmSample.Desktop" (which I don't really understand), and then tell it to continue debugging even though there were errors. This is really confusing. Lol |
The issue here is that we have different templates in different IDEs now. I personally use Rider, which produces the files you see in the sample. Back when I wrote them, this was the same for VS. Now we have TemplateStudio which does it different. The idea is to have one project where you define the App and one or several projects for the OS you want to target. In your case desktop only, but Android could be added easily. Will think about how to reflect it best in the samples and then update it. Thanks for sharing your feedback 🤗 |
Thanks for the info on how to continue with this sample. I had one weird issue, though:
I was then able to run the sample on Windows 11 using Rider. This is probably just me doing something wrong, though. |
One more thing (I am completely new to GUI development in general)... I had to change |
@archfrog |
@timunie Thanks, is there any reason at all to use |
I tend to use this to get more debug info during development, but I don't want it for production. That is what this is made for. More: https://stackoverflow.com/questions/3012822/whats-the-difference-between-console-writeline-vs-debug-writeline |
In step 3 it says to:
"Add the following code to the MainWindowViewlModel class in MainWindowViewModel.cs."
I think that should be MainViewModel class in MainViewModel.cs. There is no MainWindowViewModel class or .cs file.
In step 4:
x:DataType="vm:MainWindowViewModel"
should be:
x:DataType="vm:MainViewModel"
Also, there needs to be:
xmlns:views="clr-namespace:BasicMvvmSample.Views"
somewhere before the Title line.
MainWindowViewModel is used in a few other places as well. Changing it to MainViewModel makes all the compile errors go away.
Unfortunately I'm now getting an error that says "A project with an Output Type of Class Library cannot be started directly." I understand what it's saying but I don't know how to fix it.
The text was updated successfully, but these errors were encountered: