Right click on the project and select properties. In the Application section, find "Enable WPF for this project" and select it. The System.Windows.Automation namespace will become available.