none
Use of System.Windows classes in a Console or Unit Test project RRS feed

  • Question

  • I am trying to develop either a console app or unit tests to drive a WPF application.  I am using UI Automation in my code.  There are properties UI Automation can capture but I cannot set up the classes necessary.  My project has a reference to System.Windows, 'using System.Windows;' is set up in my class, but when I try to define a variable using a class from System.Windows, such as Rect or Point, I get an error message, "The type or namespace name 'Rect' does not exist in the namespace 'System.Windows' (are you missing an assembly reference?)"

    I am working with VS2012 Professional and have downloaded Windows SDK.

    Do I have a configuration problem or am I not able to access the classes in System.Windows in a Console or Unit Test project? Given that I need to be able to use use methods in AutomationElement that return class types like Point or Rect, what can I do to get that data?

    Friday, July 5, 2013 6:37 PM

Answers