首页 > 其他 > 详细

Test Run fails with "An exception occurred while invoking executor 'executor://mstestadapter/v2': Type ... is not marked as serializable."

时间:2020-09-18 15:40:24      阅读:40      评论:0      收藏:0      [点我收藏+]

解决方案:

  • Mark type as Serializable.
  • Don‘t add the type to CallContext.
  • Set DisableAppDomain value to true in runsettings (supported by MSTest v2, NUnit and XUnit).

       Using a runsettings file User can specify a runsettings file to configure test run. For example:

  • > vstest.console.exe --settings:test.runsettings test.dll
  • > dotnet test -s test.runsettings
  1. Using command line runsettings parameters Various elements of a runsettings file can also specified as command line parameters directly. For example, consider following runsettings:
<RunSettings>
    <RunConfiguration>
        <DisableAppDomain>True</DisableAppDomain>
    </RunConfiguration>
</RunSettings>

Test Run fails with "An exception occurred while invoking executor 'executor://mstestadapter/v2': Type ... is not marked as serializable."

原文:https://www.cnblogs.com/xixiuling/p/13690859.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!