Multiple definitions #437
Labels
duplicate 👥
Indicates that an identical issue or PR already exists
external ⤴️
Something related to or caused by an external project
mvvm-toolkit 🧰
Issues/PRs for the MVVM Toolkit
Describe the bug
I have installed nuget package and added [ObservableObject] to my ViewModel class. When I have build app, I have a lot of error messages for duplicated items
My ViewModel class looks like this
}
and errors are
Severity Code Description Project File Line Suppression State
Error CS0102 The type 'KalkulacijaViewModel' already contains a definition for 'PropertyChanged' Sara C:\Users\Manca\source\repos6\Softman22\Sara\CommunityToolkit.Mvvm.SourceGenerators\CommunityToolkit.Mvvm.SourceGenerators.ObservableObjectGenerator\Sara.ViewModels.Nabavka.KalkulacijaViewModel.g.cs 11 Active
Error CS0102 The type 'KalkulacijaViewModel' already contains a definition for 'PropertyChanging' Sara C:\Users\Manca\source\repos6\Softman22\Sara\CommunityToolkit.Mvvm.SourceGenerators\CommunityToolkit.Mvvm.SourceGenerators.ObservableObjectGenerator\Sara.ViewModels.Nabavka.KalkulacijaViewModel.g.cs 15 Active
Error CS0111 Type 'KalkulacijaViewModel' already defines a member called 'OnPropertyChanged' with the same parameter types Sara C:\Users\Manca\source\repos6\Softman22\Sara\CommunityToolkit.Mvvm.SourceGenerators\CommunityToolkit.Mvvm.SourceGenerators.ObservableObjectGenerator\Sara.ViewModels.Nabavka.KalkulacijaViewModel.g.cs 22 Active
Error CS0111 Type 'KalkulacijaViewModel' already defines a member called 'OnPropertyChanging' with the same parameter types Sara C:\Users\Manca\source\repos6\Softman22\Sara\CommunityToolkit.Mvvm.SourceGenerators\CommunityToolkit.Mvvm.SourceGenerators.ObservableObjectGenerator\Sara.ViewModels.Nabavka.KalkulacijaViewModel.g.cs 33 Active
Error CS0111 Type 'KalkulacijaViewModel' already defines a member called 'OnPropertyChanged' with the same parameter types Sara C:\Users\Manca\source\repos6\Softman22\Sara\CommunityToolkit.Mvvm.SourceGenerators\CommunityToolkit.Mvvm.SourceGenerators.ObservableObjectGenerator\Sara.ViewModels.Nabavka.KalkulacijaViewModel.g.cs 44 Active
Error CS0111 Type 'KalkulacijaViewModel' already defines a member called 'OnPropertyChanging' with the same parameter types Sara C:\Users\Manca\source\repos6\Softman22\Sara\CommunityToolkit.Mvvm.SourceGenerators\CommunityToolkit.Mvvm.SourceGenerators.ObservableObjectGenerator\Sara.ViewModels.Nabavka.KalkulacijaViewModel.g.cs 55 Active
Error CS0111 Type 'KalkulacijaViewModel' already defines a member called 'SetProperty' with the same parameter types Sara C:\Users\Manca\source\repos6\Softman22\Sara\CommunityToolkit.Mvvm.SourceGenerators\CommunityToolkit.Mvvm.SourceGenerators.ObservableObjectGenerator\Sara.ViewModels.Nabavka.KalkulacijaViewModel.g.cs 76 Active
Error CS0111 Type 'KalkulacijaViewModel' already defines a member called 'SetProperty' with the same parameter types Sara
....
All duplicated members are in .g.cs file
Regression
No response
Steps to reproduce
Expected behavior
My code without duplicated members.
Screenshots
No response
IDE and version
VS 2022
IDE version
17.3.3
Nuget packages
Nuget package version(s)
8.0.0
Additional context
No response
Help us help you
No, just wanted to report this
The text was updated successfully, but these errors were encountered: