[.NET] Failed to initialize client proxy: could not connect to test process.

------ Run test started ------
Failed to initialize client proxy: could not connect to test process.
========== Run test finished: 0 run (0:01:32.44) ==========

พอดีจะ Test Code ที่พัฒนาขึนมา แล้วเจอปัญหานี้ขึ้น และคงอารมณ์เสียไปตามๆกัน กว่าจะรอมัน Discover Test เสร็จ เวลา Test ดันมาจากเจอปัญหานี้ได้ โดยทางแก้ไข ผมได้ไปสืบเสาะหาจาก Google และได้สรุปรวบรวมเป็น 3 แนวทาง ดังนี้

  • ทางแก้ที่ 1: Set Visual Studio ให้ Run As Administrator เพราะเนื่องจาก Test process บางตัวอาจจะติด Permission บางอย่างครับ
  • ทางแก้ที่ 2: ลดการ Load Symbol โดยดึงเอาเฉพาะที่จำเป็นเท่านั้น โดยไปปรับที่เมนู Debug ->> Options ->> Symbols และเลือก "Only specified modules"
  • ทางแก้ที่ 3: อันนี้ผมไม่เข้าใจเหมือนกัน เลยขอยกคำอธิบายภาษาอังกฤษมาเลยและกัน
    It looks like this happens sometimes when the VS execution engine process is terminated. This was the case for me, since I had terminated the process manually when the process was not responding. You could check if you have "vstest.executionengine.exe" process running when you see this error message. I came across this solution at the MS forum below: http://social.msdn.microsoft.com/Forums/vstudio/en-US/997291d8-03e4-47ed-a30d-9d47550c0094/cannot-connect-to-the-testexecutor-via-named-pipes-from-vs-2012-rc
    

Discover more from naiwaen@DebuggingSoft

Subscribe to get the latest posts to your email.