How to avoid a DisconnectedContext exception when debugging MSpec tests?

I get an error DisconnectedContextwhile debugging MSpec tests, even in a new project with an empty test. The report says that the managed debugging assistant detected a problem in

C: \ PROGRAM FILES (X86) \ MICROSOFT VISUAL STUDIO 14.0 \ COMMON7 \ IDE \ COMMONEXTENSIONS \ MICROSOFT \ TESTWINDOW \ te.processhost.managed.exe

In another solution, I get FileNotFoundExceptionwhen debugging.

C: \ Users \ ME \ AppData \ Local \ Microsoft \ VisualStudio \ 14.0 \ EXPANSIONS \ WGPFTPGA.WNV \ Machine.VSTestAdapter.resources.dll

Is Visual Studio unexpectedly damaged or is it a configuration issue? I already tried reinstalling the MSpec test adapter.

+4
source share
2 answers

Today I have the same error. I tried to add log4net to the Tests project in VS2015. I just added a section <log4net>to my app.config under <configuration>(with subnomes appender, root, logger ...). Then I got the error:

DisconnectedContext has occurred

Message: Managed Debugging Assistant "DisconnectedContext" encountered a problem in "C: \ PROGRAM FILES (X86) \ MICROSOFT VISUAL STUDIO 14.0 \ COMMON7 \ IDE \ COMMONEXTENSIONS \ MICROSOFT \ TESTWINDOW \ te.processhost.managed.exe '.

: COM- 0x1301ae0 RuntimeCallableWrapper : . ( HRESULT: 0x80010108 (RPC_E_DISCONNECTED)). , COM- 0x1301ae0, RuntimeCallableWrapper, - . COM (COM- 0x1301970). . , , COM// , RuntimeCallableWrappers, COM-, .

, Debug ConfigurationErrorsException:

------ Run test started ------
NUnit VS Adapter 2.0.0.0 executing tests is started
Loading tests from C:\....Tests.dll
Exception System.Configuration.ConfigurationErrorsException, Exception thrown executing tests in C:\....\Tests.dll
NUnit VS Adapter 2.0.0.0 executing tests is finished
========== Run test finished: 0 run (0:00:46.9507369) ==========

, <section> <configSections>:

<section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler, log4net"/>

. , , .

+2

. , sql (- sql). , - , , , . {, } catch ( e) {Console.WriteLine(e)}

. .

.

+1

Source: https://habr.com/ru/post/1618711/


All Articles