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

Lots of null-warnings #4692

Open
1 of 3 tasks
NidusUmbra opened this issue Jun 19, 2023 · 0 comments
Open
1 of 3 tasks

Lots of null-warnings #4692

NidusUmbra opened this issue Jun 19, 2023 · 0 comments
Labels
bug The issue relates to the wizard not working or a problem with the generated code. Needs: Triage 🔍

Comments

@NidusUmbra
Copy link

Describe the bug

I'm seeing a lot of 'dereference of possibly null reference', ' must have a value when exiting constructor' etc after creating a new project from template.

! Warning CS8625 Cannot convert null literal to non-nullable reference type. TypeTracker2 C:\Users\leoru\Documents\CSProjects\TypeTracker2\Contracts\Services\INavigationService.cs 13 Active
Warning CS8625 Cannot convert null literal to non-nullable reference type. TypeTracker2 C:\Users\leoru\Documents\CSProjects\TypeTracker2\Services\NavigationService.cs 52 Active
Warning CS8603 Possible null reference return. TypeTracker2 C:\Users\leoru\Documents\CSProjects\TypeTracker2\App.xaml.cs 30 Active
Warning CS8618 Non-nullable field '_host' must contain a non-null value when exiting constructor. Consider declaring the field as nullable. TypeTracker2 C:\Users\leoru\Documents\CSProjects\TypeTracker2\App.xaml.cs 32 Active
Warning CS8602 Dereference of a possibly null reference. TypeTracker2 C:\Users\leoru\Documents\CSProjects\TypeTracker2\App.xaml.cs 38 Active
Warning CS8625 Cannot convert null literal to non-nullable reference type. TypeTracker2 C:\Users\leoru\Documents\CSProjects\TypeTracker2\App.xaml.cs 85 Active
Warning CS8603 Possible null reference return. TypeTracker2 C:\Users\leoru\Documents\CSProjects\TypeTracker2\Helpers\FrameExtensions.cs 12 Active
Warning CS8618 Non-nullable property 'PrivacyStatement' must contain a non-null value when exiting constructor. Consider declaring the property as nullable. TypeTracker2 C:\Users\leoru\Documents\CSProjects\TypeTracker2\Models\AppConfig.cs 5 Active
Warning CS8618 Non-nullable field '_shellWindow' must contain a non-null value when exiting constructor. Consider declaring the field as nullable. TypeTracker2 C:\Users\leoru\Documents\CSProjects\TypeTracker2\Services\ApplicationHostService.cs 18 Active
Warning CS8601 Possible null reference assignment. TypeTracker2 C:\Users\leoru\Documents\CSProjects\TypeTracker2\Services\ApplicationHostService.cs 72 Active
Warning CS8602 Dereference of a possibly null reference. TypeTracker2 C:\Users\leoru\Documents\CSProjects\TypeTracker2\Services\ApplicationHostService.cs 73 Active
Warning CS8604 Possible null reference argument for parameter 'pageKey' in 'bool INavigationService.NavigateTo(string pageKey, object parameter = null, bool clearNavigation = false)'. TypeTracker2 C:\Users\leoru\Documents\CSProjects\TypeTracker2\Services\ApplicationHostService.cs 75 Active
Warning CS8618 Non-nullable field '_frame' must contain a non-null value when exiting constructor. Consider declaring the field as nullable. TypeTracker2 C:\Users\leoru\Documents\CSProjects\TypeTracker2\Services\NavigationService.cs 19 Active
Warning CS8618 Non-nullable field '_lastParameterUsed' must contain a non-null value when exiting constructor. Consider declaring the field as nullable. TypeTracker2 C:\Users\leoru\Documents\CSProjects\TypeTracker2\Services\NavigationService.cs 19 Active
Warning CS8618 Non-nullable event 'Navigated' must contain a non-null value when exiting constructor. Consider declaring the event as nullable. TypeTracker2 C:\Users\leoru\Documents\CSProjects\TypeTracker2\Services\NavigationService.cs 19 Active
Warning CS8625 Cannot convert null literal to non-nullable reference type. TypeTracker2 C:\Users\leoru\Documents\CSProjects\TypeTracker2\Services\NavigationService.cs 36 Active
Warning CS8604 Possible null reference argument for parameter 'e' in 'void EventHandler.Invoke(object? sender, string e)'. TypeTracker2 C:\Users\leoru\Documents\CSProjects\TypeTracker2\Services\NavigationService.cs 96 Active
Warning IDE0090 'new' expression can be simplified TypeTracker2 C:\Users\leoru\Documents\CSProjects\TypeTracker2\Services\PageService.cs 13 Active
Warning CS8600 Converting null literal or possible null value to non-nullable type. TypeTracker2 C:\Users\leoru\Documents\CSProjects\TypeTracker2\Services\PageService.cs 28 Active
Warning CS8603 Possible null reference return. TypeTracker2 C:\Users\leoru\Documents\CSProjects\TypeTracker2\Services\PageService.cs 40 Active
Warning CS8604 Possible null reference argument for parameter 'key' in 'bool Dictionary<string, Type>.ContainsKey(string key)'. TypeTracker2 C:\Users\leoru\Documents\CSProjects\TypeTracker2\Services\PageService.cs 50 Active
Warning IDE0074 Use compound assignment TypeTracker2 C:\Users\leoru\Documents\CSProjects\TypeTracker2\ViewModels\ShellViewModel.cs 17 Active
Warning IDE0074 Use compound assignment TypeTracker2 C:\Users\leoru\Documents\CSProjects\TypeTracker2\ViewModels\ShellViewModel.cs 19 Active
Warning IDE0074 Use compound assignment TypeTracker2 C:\Users\leoru\Documents\CSProjects\TypeTracker2\ViewModels\ShellViewModel.cs 21 Active
Warning CS8618 Non-nullable field '_goBackCommand' must contain a non-null value when exiting constructor. Consider declaring the field as nullable. TypeTracker2 C:\Users\leoru\Documents\CSProjects\TypeTracker2\ViewModels\ShellViewModel.cs 23 Active
Warning CS8618 Non-nullable field '_loadedCommand' must contain a non-null value when exiting constructor. Consider declaring the field as nullable. TypeTracker2 C:\Users\leoru\Documents\CSProjects\TypeTracker2\ViewModels\ShellViewModel.cs 23 Active
Warning CS8618 Non-nullable field '_unloadedCommand' must contain a non-null value when exiting constructor. Consider declaring the field as nullable. TypeTracker2 C:\Users\leoru\Documents\CSProjects\TypeTracker2\ViewModels\ShellViewModel.cs 23 Active
Warning CS8622 Nullability of reference types in type of parameter 'sender' of 'void ShellViewModel.OnNavigated(object sender, string viewModelName)' doesn't match the target delegate 'EventHandler' (possibly because of nullability attributes). TypeTracker2 C:\Users\leoru\Documents\CSProjects\TypeTracker2\ViewModels\ShellViewModel.cs 30 Active
Warning CS8622 Nullability of reference types in type of parameter 'sender' of 'void ShellViewModel.OnNavigated(object sender, string viewModelName)' doesn't match the target delegate 'EventHandler' (possibly because of nullability attributes). TypeTracker2 C:\Users\leoru\Documents\CSProjects\TypeTracker2\ViewModels\ShellViewModel.cs 35 Active

To Reproduce

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Additional context

No response

Applies to the following platforms:

  • WinUI
  • WPF
  • UWP

About your setup

  • Visual Studio Version: 2022
  • Template Studio Wizard Version: 5.3
  • Windows Build: Win 10 Home 19045.3086
@NidusUmbra NidusUmbra added the bug The issue relates to the wizard not working or a problem with the generated code. label Jun 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug The issue relates to the wizard not working or a problem with the generated code. Needs: Triage 🔍
Projects
None yet
Development

No branches or pull requests

1 participant