Reputation: 137
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>
Upvotes: 7
Views: 6290
Reputation: 441
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>
Upvotes: 16