Compiler Warning WFDEV003
Version introduced: .NET 7
DomainUpDown.DomainItemAccessibleObject
is obsolete. UseAccessibleObject
instead.
Reference to DomainUpDown.DomainItemAccessibleObject generates warning WFDEV003
at compile time. This warning states that DomainItemAccessibleObject
is no longer used to provide accessible support for items in DomainUpDown controls. This type was never intended for public use.
Previously, objects of this type were served to accessibility tools that navigated the hierarchy of a DomainUpDown
control. In .NET 7 and later versions, instances of type AccessibleObject are used to represent items in a DomainUpDown
control for accessibility tools.
Workaround
Replace references of DomainUpDown.DomainItemAccessibleObject with AccessibleObject.
Suppress a warning
Suppress the warning with either of the following methods:
Set the severity of the rule in the .editorConfig file.
[*.{cs,vb}] dotnet_diagnostic.WFDEV003.severity = none
For more information about editor config files, see Configuration files for code analysis rules.
Add the following
PropertyGroup
to your project file:<PropertyGroup> <NoWarn>$(NoWarn);WFDEV003</NoWarn> </PropertyGroup>
Suppress in code with the
#pragma warning disable WFDEV003
directive.
For more information, see How to suppress code analysis warnings.
.NET Desktop feedback