Skip to content

Languages

This page is also available in 简体中文 and 日本語.

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

IDSeverityTitle
PSG0001ErrorClass with [ObservableProperty] members must be partial
PSG0002ErrorClass with command generation attribute must be partial
PSG0003ErrorProperty with [ObservableProperty] must be partial
PSG0004ErrorClass with [BindableBase] must be partial
PSG0005ErrorClass with [BindableValidator] must be partial
PSG0006Error[BindableValidator] is only supported on classes

Code fix: MakePartial is available for PSG0001–PSG0005 in the IDE (Ctrl+. / Alt+Enter).

PSG1001–PSG1002 — command signatures

IDSeverityTitle
PSG1001ErrorInvalid [DelegateCommand] method signature
PSG1002ErrorInvalid [AsyncDelegateCommand] method signature

See DelegateCommand and AsyncDelegateCommand.

PSG2001–PSG2006 — names, handlers, signatures

IDSeverityTitle
PSG2001WarningCatch handler not found
PSG2002WarningCatch handler has incompatible signature
PSG2003WarningCanExecute member not found
PSG2004WarningObserved property not found
PSG2005Warning[NotifyCanExecuteChangedFor] command not found
PSG2006WarningCanExecute member has incompatible signature

PSG3002 — AsyncDelegateCommand package

IDSeverityTitle
PSG3002ErrorAsyncDelegateCommand 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

IDSeverityTitle
PSG4001WarningServiceType is not assignable from implementation type
PSG4002WarningViewModelType could not be resolved

See Container registration.

PSG5001 — validation

IDSeverityTitle
PSG5001Warning[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

IDSeverityTitle
PSG6001InfoUse 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

IDSeverityTitle
PSG0007ErrorClass with [NavigationAware] must be partial
PSG0008ErrorClass with [DialogAware] must be partial

Code fix: MakePartial is available in the IDE.

See NavigationAware and DialogAware.

PSG7001–PSG7005 — region navigation commands

IDSeverityTitle
PSG7001ErrorIRegionManager member not found
PSG7002ErrorRegion is required for [NavigateCommand]
PSG7003ErrorTarget is required for [NavigateCommand]
PSG7004Error[NavigateOnChanged] requires [ObservableProperty]
PSG7005ErrorTargetMember is required for [NavigateOnChanged]

See NavigateCommand.

PSG7101–PSG7102 — dialog service commands

IDSeverityTitle
PSG7101ErrorIDialogService member not found
PSG7102ErrorName is required for [ShowDialogCommand]

See ShowDialogCommand.

PSG7006–PSG7008 — [FromNavigationParameter]

IDSeverityTitle
PSG7006Error[FromNavigationParameter] can only be applied to fields or properties
PSG7007Warning[FromNavigationParameter] requires [ObservableProperty]
PSG7008Error[FromNavigationParameter] key cannot be empty

See NavigationAware.

PSG7103–PSG7105 — [FromDialogParameter]

IDSeverityTitle
PSG7103Error[FromDialogParameter] can only be applied to fields or properties
PSG7104Warning[FromDialogParameter] requires [ObservableProperty]
PSG7105Error[FromDialogParameter] key cannot be empty

See DialogAware.

Next

Released under the MIT License.

Released under the MIT License.