Removed obsolete `DomainUpDownAccessibleObject` usage
Fixes #7587
Proposed changes
- Remove
DomainUpDownAccessibleObjectusage as an accessible object forDomainUpDownbecause this class is obsolete now
Customer Impact
- No
Regression?
- No
Risk
- Minimal
Test environment(s)
- .NET 7.0 RC1
- Windows 11
Microsoft Reviewers: Open in CodeFlow
@vladimir-krestov , may be i missed context. Which class is obsolete now? and how obsolete class makes removal of accessibility object? people may still use obsolete class .
@vladimir-krestov , may be i missed context. Which class is obsolete now? and how obsolete class makes removal of accessibility object? people may still use obsolete class .
nevermind, i am following discussion on original thread.
Closed this according to https://github.com/dotnet/winforms/pull/7330#discussion_r944772133
Re-opening for .NET 8. I also suggest changing warnings to errors
I think that we either need to take this in .NET 7 or undo this obsoletion https://github.com/dotnet/winforms/blob/01abac5b35616f182267222da1976d429e1eab19/src/System.Windows.Forms/src/System/Windows/Forms/DomainUpDown.DomainUpDownAccessibleObject.cs#L11-L17
We obsoleted that type as a compile time warning, applications still can use it. This gives developers time to re-write applications if needed.
Removing this would be binary breaking which we don't want to do. We should mark it as Obsolete as Error.
We still can remove the CreateAccessibleObject override. Error message should specify how to fix the error, i.e. "use the base class instead" I think the public base class is ControlAccessibleObject and AccessibleObject for items, but please verify that.
Once the PR is merged, I will create a request issue in https://github.com/dotnet/docs to add a breaking change and update existing page for WFDEV002 obsoletion.
@dmitrii-drobotov Verified on latest .NET 8.0.100-alpha.1.22567.28 build + private dll, this issue still reproduces. Error message does not contain this line "Use ControlAccessibleObject instead". Screenshot as below:

@dmitrii-drobotov Verified on latest .NET 8.0.100-alpha.1.22567.28 build + private dll, this issue still reproduces. Error message does not contain this line "Use ControlAccessibleObject instead". Screenshot as below:
@MelonWang1 Looks like you also need to replace System.Windows.Forms.dll in C:\Program Files\dotnet\packs\Microsoft.WindowsDesktop.App.Ref\[version]\ref\net8.0 folder:
I believe this is where VS takes this info from.
@dmitrii-drobotov Thank you, verified on latest .NET 8.0.100-alpha.1.22567.28 build + private dll + replace System.Windows.Forms.dll in C:\Program Files\dotnet\packs\Microsoft.WindowsDesktop.App.Ref[version]\ref\net8.0 folder, this issue was fixed. Error message contain this line "Use ControlAccessibleObject instead". Screenshot as below:
