1. I had a CodedUI Test which used CodedUI library such as -
using Microsoft.VisualStudio.TestTools.UITesting;
using Microsoft.VisualStudio.TestTools.UITesting.WinControls;
using Microsoft.VisualStudio.TestTools.UITesting.WpfControls;
I was successfully able to compile the entire solution using Visual Stduio IDE 2013 Ultimate.
But, while I was trying to compile the same using MSBuild tool, I was getting errors because of not able to find assemblies
Following errors were thrown:
FunctionalTests\CodedUITest1.cs(7,40): error CS0234: The type or namespace name 'UITesting' does not exist in the namespace 'Microsoft.VisualStudio.TestTools' (are you missing an assembly reference?) [C:\Users\Administrator\.jenkins\workspace\Bodycote\AutomatedTest\AutomatedTest.csproj] FunctionalTests\CodedUITest1.cs(9,40): error CS0234: The type or namespace name 'UITest' does not exist in the namespace 'Microsoft.VisualStudio.TestTools' (are you missing an assembly reference?)
Solution -
This error appears, when MSBuild does not find references added to project of specific version.
Visual studio facilitates to go with any version of references.
To go with any available reference, not to be very much strict about particular version, we have to set the property - "Specific Version" to false for used references. By default its true.
By setting Specific Version for all references to false, I solved the issue. MSBuild tool started compiling.
No comments:
Post a Comment