i just added the refrence of Microsoft.VisualStudio.TestTools.UITesting
in my project and i try to use the ImageComparer` class but i get an error when running this
private void Form1_Load(object sender, EventArgs e)
{
Image a = Image.FromFile(@"C:\Users\itapi\Desktop\a.png");
Image b = Image.FromFile(@"C:\Users\itapi\Desktop\b.png");
ImageComparer.Compare(a,b);
}
the error is
An unhandled exception of type 'System.TypeInitializationException' occurred in Microsoft.VisualStudio.TestTools.UITesting.dll
Additional information: The type initializer for 'Microsoft.VisualStudio.TestTools.UITest.Extension.UITestUtilities' threw an exception.
does anyone has any idea what's wrong here?
this is the innter excpetion
System.TypeInitializationException: The type initializer for 'Microsoft.VisualStudio.TestTools.UITest.Extension.UITestUtilities' threw an exception. ---> System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.VisualStudio.TestTools.UITest.WindowsStoreUtility, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
at Microsoft.VisualStudio.TestTools.UITest.Extension.UITestUtilities..cctor() --- End of inner exception stack trace --- at Microsoft.VisualStudio.TestTools.UITest.Extension.UITestUtilities.CheckForNull(Object parameter, String parameterName) at Microsoft.VisualStudio.TestTools.UITesting.ImageComparer.CompareInternal(Image actualImage, Image expectedImage, ColorDifference argbTolerance, Image& diffImage, Boolean createOutImage) at Microsoft.VisualStudio.TestTools.UITesting.ImageComparer.Compare(Image actualImage, Image expectedImage, ColorDifference argbTolerance) at Microsoft.VisualStudio.TestTools.UITesting.ImageComparer.Compare(Image actualImage, Image expectedImage) at WindowsFormsApplication4.Form1.Form1_Load(Object sender, EventArgs e) in c:\Users\itapi\OneDrive\??????\Visual Studio 2013\Projects\WindowsFormsApplication4\WindowsFormsApplication4\Form1.cs:line 30