referencing System.Windows.Automation

44,354

Solution 1

The UIAutomationClient.dll is located in this folder:

C:\Program Files\Reference Assemblies\Microsoft\Framework\v3.0

If you can't find in your Add Reference->.Net tab, then you have to use the Browse tab to go to the given path, and add the assembly (Right Click on the References, choose add reference, click browse tab).

Solution 2

add Uiautomationclient dll present under .net tab

Solution 3

I'm using Visual Studio Express 2015, and targeting to .NET 4.5. None of the answers worked for me. Here's what I had to do (after many minutes of looking through Add References -> Assemblies -> Framework and playing around. The reference I added is "UIAutomationClient". (There isn't any System.Windows.Automation" assembly in my list. Note that I also see assemblies "UIAutomationProvider", "UIAutomationTypes", and "UIAutomationClientsideProviders", but I didn't try any of those.)

Anyway, once I got the reference to "UIAutomationClient" added, then the using System.Windows.Automation actually worked okay.

Share:
44,354
tbischel
Author by

tbischel

Software Engineer working at SendGrid. I got my Masters in Mechanical Engineering, though my focus was Pen Based interfaces for CAD. My undergraduate degree was in Electrical Engineering and Computer Science from UC Berkeley.

Updated on January 07, 2022

Comments

  • tbischel
    tbischel over 2 years

    I wanted to try out some of the automation stuff available through BugSlayer, but am having problems with the references.

    I'm trying to figure out how to reference the System.Windows.Automation library in visual studio. I have the .NET Framework v3.5 installed, and VS 2008, but neither the UIAutomationClient nor System.Windows.Automation appear as a reference option in either the .NET or COM tabs for the references.

    I can see the dll if I navigate to C:\WINDOWS\assembly\GAC_MSIL\UIAutomationClient\3.0.0.0__31bf3856ad364e35 through the command prompt, but if I browse to the assembly in Visual Studio, I can't actually get to the dlls.

    Have I overlooked a simple way to include this in my project?