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.

Next

Released under the MIT License.

Released under the MIT License.