C
C#10mo ago
Mekasu0124

✅ Inconsistent accessibility??? Avalonia C#

public partial class MainWindowViewModel : ViewModelBase
{
#region ObservableProperties
#region PrivateFields

public MainWindowViewModel(CreateUserViewModel createUserViewModel,
HomeScreenViewModel homeScreenViewModel,
Database db,
Helpers hp,
GithubService gvs)
{
_createUserViewModel = createUserViewModel;
_homeScreenViewModel = homeScreenViewModel;

_db = db;
_hp = hp;
_gvs = gvs;
}
}
public partial class MainWindowViewModel : ViewModelBase
{
#region ObservableProperties
#region PrivateFields

public MainWindowViewModel(CreateUserViewModel createUserViewModel,
HomeScreenViewModel homeScreenViewModel,
Database db,
Helpers hp,
GithubService gvs)
{
_createUserViewModel = createUserViewModel;
_homeScreenViewModel = homeScreenViewModel;

_db = db;
_hp = hp;
_gvs = gvs;
}
}
On public MainWindowViewModel I get the error Inconsistent accessibility: parameter type 'HomeScreenViewModel' is less accessible than method 'MainWindowViewModel.MainWindowViewModel(CreateUserViewModel, HomeScreenViewModel, Database, Helpers, GithubService)' and I'm just not sure what that means.
2 Replies
Jimmacle
Jimmacle10mo ago
what accessibility level does HomeScreenViewModel have? accessibility meaning public/internal/private/etc
Mekasu0124
Mekasu0124OP10mo ago
ok fixing the view model to be public instead of internal fixed that, but now I have another issue if that's ok HomeScreenView.axaml: https://pastebin.com/Wp7U0CW1 HomeScreenView.axaml.cs: https://pastebin.com/RKJ5QNAS HomeScreenViewModel.cs: https://pastebin.com/j9C6KYTf MainWindowView.axaml: https://pastebin.com/iy87tx8P the view model is empty because I haven't started working on it yet, however, I'm getting the error
Unable to resolve type Diary.Views.HomeScreenView -> HomeScreenView.axaml

Internal compiler error while transforming node XamlX.Ast.AxamlAstXamlPropertyValueNode: System.FormatsException: Input string was not in a coorrect format. -> MainWindow.axaml
Unable to resolve type Diary.Views.HomeScreenView -> HomeScreenView.axaml

Internal compiler error while transforming node XamlX.Ast.AxamlAstXamlPropertyValueNode: System.FormatsException: Input string was not in a coorrect format. -> MainWindow.axaml
I'm looking around google and I'm not finding anything to solve this lol grrr
Want results from more Discord servers?
Add your server