0
votes

Automation solution is cleaning and building properly but while building it using build definition its throwing error,

Its checking with the file on location where we are saving the builded solution .dll files and throwing error:

Desktop\Pages\NewFieldPropertiesPage.cs(729,45): error CS1705: Assembly 'Aptean.Windows.Automation' with identity 'Aptean.Windows.Automation, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' uses 'UiaComWrapper, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' which has a higher version than referenced assembly 'UiaComWrapper' with identity 'UiaComWrapper, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' [C:\agent-DGA1BDT04TFS13_work\1\s\Respond.Test.Base\Respond.Test.Base.csproj]

This is how we define automation element: and getting error findin "AutomationElement" and "PropertyCondition" which is coming from "System.Windows.Automation" assembly

```       {
```           get
```           {
```               AutomationElement root = AutomationElement.RootElement;
```               PropertyCondition PropApplicaionRoot = new PropertyCondition(AutomationElement.AutomationIdProperty, "MainForm");
```             AutomationElement ApplicationRoot = root.FindFirst(TreeScope.Subtree, PropApplicaionRoot);
```                PropertyCondition PropSideMenuRoot = new PropertyCondition(AutomationElement.AutomationIdProperty, "pnlObjectAndFieldDetails");
```               AutomationElement SideMenuRoot = ApplicationRoot.FindFirst(TreeScope.Subtree, PropSideMenuRoot);
```               PropertyCondition propEntitiesAndFields = new PropertyCondition(AutomationElement.NameProperty, "Boolean Field 135374");
```               AutomationElement OKButton = SideMenuRoot.FindFirst(TreeScope.Subtree, propEntitiesAndFields);
```               return OKButton;
```           }
```       }

Below is the error i am getting, one of the error statement:


Respond.Test.Base\Desktop\UIMap\SelectSkillPageMap.cs (30, 45)
Respond.Test.Base\Desktop\UIMap\SelectSkillPageMap.cs(30,45): Error CS1705: Assembly 'Aptean.Windows.Automation' with identity 'Aptean.Windows.Automation, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' uses 'UiaComWrapper, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' which has a higher version than referenced assembly 'UiaComWrapper' with identity 'UiaComWrapper, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
1
Well, the error tells exactly the problem. Just reference the same 'UiaComWrapper, Version=14.0.0.0 as the Aptean.Windows.Automation does. Apparently, you're referencing an older one.Simon Mourier
this has been resolved, actually we are building the solution in a VM and after building the solution the .dll files we are getting these files we are copying to another VM and using to trigger tests. Coming to error this issue we were facing because the VM we are building the solution, the package folder was not able to get latest pckgs, so deleting the local solution from VM and building again has resolved the issue. Thanks for suggestionsLaveen sharma

1 Answers

0
votes

Actually we are checking in the correct file and solution was also building, while digging deep in the error mentioned, It was only failing when building using the source solution in a VM, where when getting latest was not changing the reference file. Deleted the solution from the location and then ran the VNext build has resolved the issue as this time it took the latest versions of .dll files from source.

Thanks.