Tôi đang cố gắng sử dụng các hội đồng như thế này trong một dự án VS2012:kiểm tra UI Coded - không thể giải quyết biểu tượng UITesting
using Microsoft.VisualStudio.TestTools.UITesting;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Microsoft.VisualStudio.TestTools.UITest.Extension;
Tuy nhiên tôi nhận được một loạt các màu đỏ trong các thử nghiệm của tôi:
Tôi có thể tạo và chạy cục bộ ngay cả với màu đỏ này, nhưng tôi muốn giải quyết vấn đề này nếu có thể. Máy xây dựng của tôi từ chối điều này với các lỗi sau:
DashboardTest.cs (7): The type or namespace name 'UITesting' does not exist in the namespace 'Microsoft.VisualStudio.TestTools' (are you missing an assembly reference?)
DashboardTest.cs (9): The type or namespace name 'UITest' does not exist in the namespace 'Microsoft.VisualStudio.TestTools' (are you missing an assembly reference?)
UIMap.cs (9): The type or namespace name 'UITest' does not exist in the namespace 'Microsoft.VisualStudio.TestTools' (are you missing an assembly reference?)
UIMap.cs (10): The type or namespace name 'UITesting' does not exist in the namespace 'Microsoft.VisualStudio.TestTools' (are you missing an assembly reference?)
UIMap.Designer.cs (19): The type or namespace name 'UITest' does not exist in the namespace 'Microsoft.VisualStudio.TestTools' (are you missing an assembly reference?)
UIMap.Designer.cs (20): The type or namespace name 'UITesting' does not exist in the namespace 'Microsoft.VisualStudio.TestTools' (are you missing an assembly reference?)
UIMap.Designer.cs (132): The type or namespace name 'BrowserWindow' could not be found (are you missing a using directive or an assembly reference?)
DashboardTest.cs (10): The type or namespace name 'UITesting' does not exist in the namespace 'Microsoft.VisualStudio.TestTools' (are you missing an assembly reference?)
UIMap.cs (12): The type or namespace name 'UITesting' does not exist in the namespace 'Microsoft.VisualStudio.TestTools' (are you missing an assembly reference?)
UIMap.cs (13): The type or namespace name 'UITesting' does not exist in the namespace 'Microsoft.VisualStudio.TestTools' (are you missing an assembly reference?)
UIMap.Designer.cs (22): The type or namespace name 'UITesting' does not exist in the namespace 'Microsoft.VisualStudio.TestTools' (are you missing an assembly reference?)
UIMap.Designer.cs (23): The type or namespace name 'UITesting' does not exist in the namespace 'Microsoft.VisualStudio.TestTools' (are you missing an assembly reference?)
DashboardTest.cs (18): The type or namespace name 'CodedUITest' could not be found (are you missing a using directive or an assembly reference?)
DashboardTest.cs (18): The type or namespace name 'CodedUITestAttribute' could not be found (are you missing a using directive or an assembly reference?)
Bất kỳ mẹo nào? Tất cả các tham chiếu trong dự án thử nghiệm của tôi được thiết lập để sao chép local = true.
CẬP NHẬT - Tôi nhận các tham chiếu hoạt động cục bộ bằng cách thêm tham chiếu đến visualStudio.TestTools.UITesting, nhưng thuộc tính CodedUITest vẫn còn màu đỏ và bản dựng vẫn không thành công với cùng lỗi.
Bạn có sử dụng VS2012 Ultimate hoặc VS2012 Premium không? Giao diện người dùng được mã hóa chỉ chạy trên các IDE này. – neoscribe