MS Unit测试抛出警告-----运行测试开始------ System.AppDomainUnloadedException:尝试访问已卸载的AppDomain。如果测试开始一个线程但没有停止它,就会发生这种情况。确保测试启动所有线程 [英] MS Unit test throws warning ----- Run test started ------ System.AppDomainUnloadedException: Attempted to access an unloaded AppDomain. This can happen if the test(s) started a thread but did not stop it. Make sure that all the threads started by the test
问题描述
Hello All,
我们在Visual Studio 2015 enterprise和.NET framework 4.5.2下开发了单元测试项目。在执行为访问Web套接字端口的库开发的测试时,我得到了以下警告。
-----运行测试开始 - ----
$
System.AppDomainUnloadedException:尝试访问已卸载的AppDomain。如果测试开始一个线程但没有停止它,就会发生这种情况。确保测试启动的所有线程在完成之前停止。
$
System.AppDomainUnloadedException:尝试访问已卸载的AppDomain。如果测试开始一个线程但没有停止它,就会发生这种情况。确保测试启动的所有线程在完成之前停止。
$
==========运行测试完成:1次运行(0:00:06.2894172)= =========
知道怎么摆脱这个吗?
如果这篇文章回答你的问题,请点击标记为答案。如果这篇文章有用,请点击
标记为有帮助。
我们在Visual Studio 2015企业和.NET framework 4.5.2下开发了单元测试项目。在执行为访问Web套接字端口的库开发的测试时,我收到了以下警告。
什么时候测试不是单元测试?
Hello All,
We have developed unit test project under Visual studio 2015 enterprise and .NET framework 4.5.2. I am getting below warning when executing tests developed for libraries which are accessing Web socket ports.
----- Run test started ------
System.AppDomainUnloadedException: Attempted to access an unloaded AppDomain. This can happen if the test(s) started a thread but did not stop it. Make sure that all the threads started by the test(s) are stopped before completion.
System.AppDomainUnloadedException: Attempted to access an unloaded AppDomain. This can happen if the test(s) started a thread but did not stop it. Make sure that all the threads started by the test(s) are stopped before completion.
========== Run test finished: 1 run (0:00:06.2894172) ==========
Any idea how to get rid of this ?
If this post answers your question, please click Mark As Answer. If this post is helpful please click Mark as Helpful.
We have developed unit test project under Visual studio 2015 enterprise and .NET framework 4.5.2. I am getting below warning when executing tests developed for libraries which are accessing Web socket ports.
When is a test not a unit test?
这篇关于MS Unit测试抛出警告-----运行测试开始------ System.AppDomainUnloadedException:尝试访问已卸载的AppDomain。如果测试开始一个线程但没有停止它,就会发生这种情况。确保测试启动所有线程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!