How to add UIAutomationClient.dll and UIAutomationTypes.dll to .Net Core 5.0 project?

Viewed 1763

How to use UIAutomationClient.dll and UIAutomationTypes.dll in .NET 5.0 project since there is no nuget package available!

I'm trying to convert a .NET Framework 4.8 project to .NET 5.0

<Project Sdk="Microsoft.NET.Sdk.WindowsDesktop">
    <PropertyGroup>
        <OutputType>WinExe</OutputType>
        <TargetFrameworks>net48;net5.0-windows</TargetFrameworks>
        <UseWindowsForms>true</UseWindowsForms>
        <LangVersion>9.0</LangVersion>
    </PropertyGroup>
</Project>
1 Answers

This .csproj is enough to use System.Windows.Automation (UIAutomation) in net5

<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <OutputType>Exe</OutputType>
    <TargetFramework>net5.0-windows</TargetFramework>
  </PropertyGroup>
  <ItemGroup>
    <FrameworkReference Include="Microsoft.WindowsDesktop.App.WPF"/>
  </ItemGroup>
</Project>
Related