2016-02-03 18 views
5

Vấn đềBắt đầu Unit Test trong Visual Studio rất chậm, nhiều lần tải/dỡ cùng dll

Tôi đang gặp sự chậm trễ nghiêm trọng (vài phút) trong khởi động một thử nghiệm đơn vị và nó dường như không quan trọng nếu Tôi đang gỡ lỗi hay không.

Khi gỡ lỗi tôi có thể thấy trong cửa sổ đầu ra, có một gói được lặp lại và tải lại. Điều này xảy ra theo nghĩa đen hàng ngàn lần.

'vstest.executionengine.x86.exe' (CLR v4.0.30319: Domain 929): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_32\mscorlib\v4.0_4.0.0.0__b77a5c561934e089\mscorlib.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled. 
'vstest.executionengine.x86.exe' (CLR v4.0.30319: Dependency finder domain): Loaded 'C:\WINDOWS\assembly\GAC_MSIL\Microsoft.VisualStudio.QualityTools.Tips.UnitTest.AssemblyResolver\12.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualStudio.QualityTools.Tips.UnitTest.AssemblyResolver.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled. 
'vstest.executionengine.x86.exe' (CLR v4.0.30319: Dependency finder domain): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Core\v4.0_4.0.0.0__b77a5c561934e089\System.Core.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled. 
'vstest.executionengine.x86.exe' (CLR v4.0.30319: Dependency finder domain): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System\v4.0_4.0.0.0__b77a5c561934e089\System.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled. 
'vstest.executionengine.x86.exe' (CLR v4.0.30319: Dependency finder domain): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Configuration\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Configuration.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled. 
'vstest.executionengine.x86.exe' (CLR v4.0.30319: Dependency finder domain): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Xml\v4.0_4.0.0.0__b77a5c561934e089\System.Xml.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled. 
'vstest.executionengine.x86.exe' (CLR v4.0.30319: Dependency finder domain): Loaded 'C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\PrivateAssemblies\Microsoft.VisualStudio.TeamSystem.Licensing.dll'. Symbols loaded. 
'vstest.executionengine.x86.exe' (CLR v4.0.30319: Dependency finder domain): Loaded 'C:\WINDOWS\assembly\GAC_MSIL\Microsoft.VisualStudio.QualityTools.Common\12.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualStudio.QualityTools.Common.dll'. Symbols loaded. 

'vstest.executionengine.x86.exe' (CLR v4.0.30319: Domain 929): Unloaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_32\mscorlib\v4.0_4.0.0.0__b77a5c561934e089\mscorlib.dll' 
'vstest.executionengine.x86.exe' (CLR v4.0.30319: Dependency finder domain): Unloaded 'C:\WINDOWS\assembly\GAC_MSIL\Microsoft.VisualStudio.QualityTools.Tips.UnitTest.AssemblyResolver\12.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualStudio.QualityTools.Tips.UnitTest.AssemblyResolver.dll' 
'vstest.executionengine.x86.exe' (CLR v4.0.30319: Dependency finder domain): Unloaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Core\v4.0_4.0.0.0__b77a5c561934e089\System.Core.dll' 
'vstest.executionengine.x86.exe' (CLR v4.0.30319: Dependency finder domain): Unloaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System\v4.0_4.0.0.0__b77a5c561934e089\System.dll' 
'vstest.executionengine.x86.exe' (CLR v4.0.30319: Dependency finder domain): Unloaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Configuration\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Configuration.dll' 
'vstest.executionengine.x86.exe' (CLR v4.0.30319: Dependency finder domain): Unloaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Xml\v4.0_4.0.0.0__b77a5c561934e089\System.Xml.dll' 
'vstest.executionengine.x86.exe' (CLR v4.0.30319: Dependency finder domain): Unloaded 'C:\WINDOWS\assembly\GAC_MSIL\Microsoft.VisualStudio.QualityTools.Common\12.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualStudio.QualityTools.Common.dll' 
'vstest.executionengine.x86.exe' (CLR v4.0.30319: Dependency finder domain): Unloaded 'C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\PrivateAssemblies\Microsoft.VisualStudio.TeamSystem.Licensing.dll' 

tôi đã cố gắng ...

  • chạy Visual Studio 2013 as administrator.
  • giải pháp sau: https://stackoverflow.com/a/14115731/632336 (Chỉ kích hoạt mã của tôi & Nạp tất cả các ký hiệu), nhưng khi tôi bấm vào nút để tải tất cả các ký hiệu Visual Studio đơn giản bị treo. (đôi khi ngay lập tức, đôi khi sau khi tải xong)
  • bật/tắt Máy chủ Biểu tượng Microsoft, không có sự khác biệt .
  • khởi động Visual Studio với tính năng ghi nhật ký được bật nhưng không có gì là dường như không bình thường hoặc liên quan đến vấn đề của tôi.
  • Tạo dự án thử nghiệm trống mới từ đầu. Cùng một vấn đề
+0

Đó là không phải là rất hữu ích, nhưng chúng tôi nhận thấy rằng việc tắt triển khai trong hồ sơ thiết lập thử nghiệm sẽ làm giảm đáng kể sự chậm trễ trước khi bắt đầu thử nghiệm đầu tiên. – Rob

+0

Tôi đang gặp sự cố này và gây ra khoảng 15 đến 20 phút thời gian xây dựng. Có ai đi đến một giải pháp về điều này? – osoclever

Trả lời

0

Tôi gặp vấn đề tương tự trong hộp dev của tôi. Tôi mở fiddler và tìm thấy rất nhiều cuộc gọi được thực hiện để 'symweb'.

Vì vậy, tôi đã tạo quy tắc tự động trả lời tự động khi bỏ qua các cuộc gọi này. Sau này, độ trễ trước khi bắt đầu thử nghiệm giảm xuống dưới một giây.

enter image description here

0

Có lẽ không phải là một câu trả lời dứt khoát vì nó áp dụng cho Visual Studio 2015, nhưng nó có thể giúp một số người.

Gần đây, chúng tôi đã cài đặt bản cập nhật "Microsoft ASP.NET và Web Tools" (thông qua Tiện ích mở rộng & Cập nhật) và kể từ đó phát hiện chậm các bài kiểm tra đơn vị đã được giải quyết. Thay vì dành khoảng 2 phút để bắt đầu một bài kiểm tra đơn vị, bây giờ nó chỉ mất một vài giây.

Việc gia hạn được cập nhật từ phiên bản 14.1.11107.0 để 14.1.21111.0

Các vấn đề liên quan