Diagnostics reference
Compiler diagnostics are defined in Prism.SourceGenerators/Diagnostics/DiagnosticDescriptors.cs on master. Titles below match the descriptor title; see the compiler message for parameterised text.
Help link
Descriptors point at the product README diagnostics section; this page is the preferred human index.
PSG0001–PSG0004 — partial requirements
| ID | Severity | Title |
|---|---|---|
| PSG0001 | Error | Class with [ObservableProperty] members must be partial |
| PSG0002 | Error | Class with command generation attribute must be partial |
| PSG0003 | Error | Property with [ObservableProperty] must be partial |
| PSG0004 | Error | Class with [BindableBase] must be partial |
| PSG0005 | Error | Class with [BindableValidator] must be partial |
| PSG0006 | Error | [BindableValidator] is only supported on classes |
Code fix: MakePartial is available for PSG0001–PSG0005 in the IDE (Ctrl+. / Alt+Enter).
PSG1001–PSG1002 — command signatures
| ID | Severity | Title |
|---|---|---|
| PSG1001 | Error | Invalid [DelegateCommand] method signature |
| PSG1002 | Error | Invalid [AsyncDelegateCommand] method signature |
See DelegateCommand and AsyncDelegateCommand.
PSG2001–PSG2006 — names, handlers, signatures
| ID | Severity | Title |
|---|---|---|
| PSG2001 | Warning | Catch handler not found |
| PSG2002 | Warning | Catch handler has incompatible signature |
| PSG2003 | Warning | CanExecute member not found |
| PSG2004 | Warning | Observed property not found |
| PSG2005 | Warning | [NotifyCanExecuteChangedFor] command not found |
| PSG2006 | Warning | CanExecute member has incompatible signature |
PSG3002 — AsyncDelegateCommand package
| ID | Severity | Title |
|---|---|---|
| PSG3002 | Error | AsyncDelegateCommand package required for Prism prior to 9.0 |
Install MvvmAIO.Prism.SourceGenerators and, on Prism.Core 8.1.97, MvvmAIO.Prism.Bcl.Commands, or upgrade to Prism 9+.
PSG4001–PSG4002 — container registration
| ID | Severity | Title |
|---|---|---|
| PSG4001 | Warning | ServiceType is not assignable from implementation type |
| PSG4002 | Warning | ViewModelType could not be resolved |
PSG5001 — validation
| ID | Severity | Title |
|---|---|---|
| PSG5001 | Warning | [NotifyDataErrorInfo] requires BindableValidator base type |
[NotifyDataErrorInfo] is only effective when the containing type inherits from BindableValidator or is annotated with [BindableValidator]. Without it the generated setter will not call ValidateProperty. See BindableValidator.
PSG6001 — partial property suggestion
| ID | Severity | Title |
|---|---|---|
| PSG6001 | Info | Use partial property for [ObservableProperty] (C# 13+) |
Code fix: Convert field-backed [ObservableProperty] to a partial property when C# 13+ is enabled.
PSG0007–PSG0008 — Navigation & dialog awareness
| ID | Severity | Title |
|---|---|---|
| PSG0007 | Error | Class with [NavigationAware] must be partial |
| PSG0008 | Error | Class with [DialogAware] must be partial |
Code fix: MakePartial is available in the IDE.
See NavigationAware and DialogAware.
PSG7001–PSG7005 — region navigation commands
| ID | Severity | Title |
|---|---|---|
| PSG7001 | Error | IRegionManager member not found |
| PSG7002 | Error | Region is required for [NavigateCommand] |
| PSG7003 | Error | Target is required for [NavigateCommand] |
| PSG7004 | Error | [NavigateOnChanged] requires [ObservableProperty] |
| PSG7005 | Error | TargetMember is required for [NavigateOnChanged] |
See NavigateCommand.
PSG7101–PSG7102 — dialog service commands
| ID | Severity | Title |
|---|---|---|
| PSG7101 | Error | IDialogService member not found |
| PSG7102 | Error | Name is required for [ShowDialogCommand] |
See ShowDialogCommand.
PSG7006–PSG7008 — [FromNavigationParameter]
| ID | Severity | Title |
|---|---|---|
| PSG7006 | Error | [FromNavigationParameter] can only be applied to fields or properties |
| PSG7007 | Warning | [FromNavigationParameter] requires [ObservableProperty] |
| PSG7008 | Error | [FromNavigationParameter] key cannot be empty |
See NavigationAware.
PSG7103–PSG7105 — [FromDialogParameter]
| ID | Severity | Title |
|---|---|---|
| PSG7103 | Error | [FromDialogParameter] can only be applied to fields or properties |
| PSG7104 | Warning | [FromDialogParameter] requires [ObservableProperty] |
| PSG7105 | Error | [FromDialogParameter] key cannot be empty |
See DialogAware.