Xamarin UI Test sometimes fails to start

半城伤御伤魂 提交于 2019-12-21 06:04:40

问题


Times from times when we try to run our Xamarin UI Tests our app/test fails to start with the following error:

System.Net.Http.HttpRequestException : An error occurred while sending the request
  ----> System.IO.IOException : Unable to write data to the transport connection: The socket has been shut down.
  ----> System.Net.Sockets.SocketException : The socket has been shut down

What is happening? Here is my environment:

  • MacOS High Sierra
  • Visual Studio for Mac 7.6.1 (Build 9)

回答1:


Solution:

  1. Don't get the latest version of the Visual Studio.

  2. Install version 5.10.1 of the Mono package : https://www.mono-project.com/download/stable/

  3. Before install, close Visual Studio then proceeds with the downloaded package installation.

  4. Restart Visual Studio and go to Preferences->Project->.NET Runtime and select the 5.10.1 version of Mono as the default one.
  5. After that reload Visual Studio and everything should work.

Cheers!




回答2:


Sometimes during IDE updates, even Mono can be updated. It seems, from my experience, that the version 5.10.1.17 is the most reliable for UI Testing and 5.12.x doesn't even works. So if you are having this sort of problem, try to downgrade your Mono version.

You may need to reinstall everything up, depending on how much of a mess is your environment.




回答3:


If the problem persists and you are on Mac, you may need to do a complete clean up in the Environment on the system modified by the Visual Studio Installer (Library/Framework folder) before installing again.

Follow these guidelines to truly uninstall Visual Studio (and its dependencies).




回答4:


Please update your xamarin UI test package after updating your visual studio that will resolve your problem



来源:https://stackoverflow.com/questions/52009889/xamarin-ui-test-sometimes-fails-to-start

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!