c# dll microsoft dll exception -


i added refrence of microsoft.visualstudio.testtools.uitesting in project , try use imagecomparer` class error when running this

 private void form1_load(object sender, eventargs e)     {         image = image.fromfile(@"c:\users\itapi\desktop\a.png");         image b = image.fromfile(@"c:\users\itapi\desktop\b.png");         imagecomparer.compare(a,b);     } 

the error

an unhandled exception of type 'system.typeinitializationexception' occurred in microsoft.visualstudio.testtools.uitesting.dll

additional information: type initializer 'microsoft.visualstudio.testtools.uitest.extension.uitestutilities' threw exception.

does has idea what's wrong here?

this innter excpetion

system.typeinitializationexception: type initializer 'microsoft.visualstudio.testtools.uitest.extension.uitestutilities' threw exception. ---> system.io.filenotfoundexception: not load file or assembly 'microsoft.visualstudio.testtools.uitest.windowsstoreutility, version=12.0.0.0, culture=neutral, publickeytoken=b03f5f7f11d50a3a' or 1 of dependencies. system cannot find file specified.
@ microsoft.visualstudio.testtools.uitest.extension.uitestutilities..cctor() --- end of inner exception stack trace --- @ microsoft.visualstudio.testtools.uitest.extension.uitestutilities.checkfornull(object parameter, string parametername) @ microsoft.visualstudio.testtools.uitesting.imagecomparer.compareinternal(image actualimage, image expectedimage, colordifference argbtolerance, image& diffimage, boolean createoutimage) @ microsoft.visualstudio.testtools.uitesting.imagecomparer.compare(image actualimage, image expectedimage, colordifference argbtolerance) @ microsoft.visualstudio.testtools.uitesting.imagecomparer.compare(image actualimage, image expectedimage) @ windowsformsapplication4.form1.form1_load(object sender, eventargs e) in c:\users\itapi\onedrive\??????\visual studio 2013\projects\windowsformsapplication4\windowsformsapplication4\form1.cs:line 30

could not load file or assembly 'microsoft.visualstudio.testtools.uitest.windowsstoreutility ...

that's entirely expected. assembly meant used within visual studio. present in c:\program files (x86)\microsoft visual studio 12.0\common7\ide\privateassemblies directory, quite out of reach winforms app. clr never find it.

same true microsoft.visualstudio.testtools.uitesting.dll assembly got copy in bin\debug directory because referenced it.

these assemblies meant used create unit tests, kind run test > run menu item. msdn how-to article creating coded ui tests is here.

you can copy missing assembly xcopy in post build event. using integrated unit test feature best , decent way minimal guarantee still works when update vs version.


Comments

Popular posts from this blog

How to provide Authorization & Authentication using Asp.net, C#? -

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

android - Pass an Serializable object in AIDL -