Provide a NuGet package for UIAutomation assemblies
- Dominant language
- C#
- Stars
- 7.7k
- Forks
- 1.3k
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 61
Description
The current implementation of the UIAutomation assemblies is tied to the `Microsoft.WindowsDesktop.App` framework. This makes it difficult to use for custom UI toolkits not based on WPF or WinForms and requires an undesirable dependencies on WPF native libraries.
Use case: for custom UI toolkits that want to support accessibility there needs to be a way to use the UIAutomation assemblies. For .NET Framework these libraries are readily available as part of the framework. For .NET Core in order to reference these assemblies one must add a framework reference to `Microsoft.WindowsDesktop.App` however this brings in many unneeded assembly references (including WinForms, WPF etc...) which aren't needed when using a custom UI toolkit.
The ideal solution would be a nuget package that:
1. for .NET Framework includes references to the assemblies in .NET framework
2. for .NET Core includes just the required UIAutomation assemblies need to implement accessibility.
In fact our current solution to this is a hacked together nuget package that does just this - [see here](https://github.com/toptensoftware/uiautomation). Unfortunately it also needs to bring in a dependency on PresentationNative_cor3.dll.
One solution suggested by the UIAutomation team was to generate our own copy of Primary Interop Assembly using the tlbimp tool however if a toolkit has already implemented accessibility using the UIAutomation classes in .NET Framework this means considerable additional work porting to this different API.
While this is a fairly niche requirement, any UI toolkit (eg: AvaloniaUI) wanting to target .NET Core will face a similar problem. If Microsoft could provide a standalone nuget package that provides the UIAutomation assemblies required to implement accessibility this would be a great help to anyone implementing custom UI toolkits.
Contributor guide
Assessment
This issue has not been assessed yet.