CommunityToolkit / dotnet

.NET Community Toolkit is a collection of helpers and APIs that work for all .NET developers and are agnostic of any specific UI platform. The toolkit is maintained and published by Microsoft, and part of the .NET Foundation.
https://docs.microsoft.com/dotnet/communitytoolkit/?WT.mc_id=dotnet-0000-bramin
Other
2.99k stars 294 forks source link

MVVM Toolkit Errors #625

Closed QJS-RH closed 1 year ago

QJS-RH commented 1 year ago

Discussed in https://github.com/CommunityToolkit/dotnet/discussions/624

Originally posted by **QJS-RH** March 1, 2023 VS 2022 17.5.0 Create WPF Application and add Nuget package CommunityToolkit.Mvvm 8.1.0 Immediately analyzers show errors MVVMTK0008 with an X, 0020 with an X, 0032 with Info, 0033 with Info and 0034 with Info. Code compiles and runs. ![MVVMErrors](https://user-images.githubusercontent.com/10412049/222031134-b17aed6f-777c-43d7-b5bb-877448b68ab4.JPG) As I program more, more errors appear Generally CS0103 Adding a simple class as `using CommunityToolkit.Mvvm.ComponentModel; namespace RHOKSWPF_Working; public partial class MainProgressBarVM : ObservableObject { private readonly string ProgressMessage = "Loading Application"; public MainProgressBarVM() { ThisIsMyVariable = ProgressMessage; } [ObservableProperty] private string? thisIsMyVariable; } ` Produces Error CS0103 ![Capture](https://user-images.githubusercontent.com/10412049/222032967-58613719-e66e-4b5c-801f-75fc4c688b3a.JPG) csproj file for reference. ![image](https://user-images.githubusercontent.com/10412049/222033341-93a9abbb-f0d2-4fe9-973f-6f3507e88fe8.png)
amdo1148 commented 1 year ago

I had the same issue. Is there any update for this error and when it will be the next update? Thank you!

Sergio0694 commented 1 year ago

That red squiggly line is an issue with IntelliSense, closing as a duplicate of #493.