I am targeting .NET 4.0 in my C# project. I do see nunit-agent appearing during execution. I tried playing with RequireSTA, but to no avail.
I looked at nunit.exe.config and nunit-console.exe.config for 2.6.2. This is what it looks like with my modifications based on what I found on the web:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<!--
The .NET 2.0 build of the console runner only
runs under .NET 2.0 or higher. The setting
useLegacyV2RuntimeActivationPolicy only applies
under .NET 4.0 and permits use of mixed mode
assemblies, which would otherwise not load
correctly.
-->
<startup useLegacyV2RuntimeActivationPolicy="true">
<requiredRuntime version="v4.0" />
<supportedRuntime version="v4.0"/>
</startup>
<runtime>
<!-- Ensure that test exceptions don't crash NUnit -->
<legacyUnhandledExceptionPolicy enabled="1"/>
<!-- Run partial trust V2 assemblies in full trust under .NET 4.0 -->
<loadFromRemoteSources enabled="true"/>
<!-- Look for addins in the addins directory for now -->
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<probing privatePath="lib;addins"/>
</assemblyBinding>
</runtime>
</configuration>
With this config, I no longer see nunit-agent being started. I get the same error as with ReSharper:
No connection could be made because the target machine actively refused it 127.0.0.1:6729
I tried adding similar startup entries to app.config of my test project with the same result.
I'm going to experiment with .NET 4.5 tomorrow. Please let me know if you have other suggestions. Maybe my config file is wrong.
Hi Charlie,
Thanks for the pointers!
I am targeting .NET 4.0 in my C# project. I do see nunit-agent appearing during execution. I tried playing with RequireSTA, but to no avail.
I looked at nunit.exe.config and nunit-console. exe.config for 2.6.2. This is what it looks like with my modifications based on what I found on the web: untimeActivatio nPolicy only applies imeActivationPo licy="true" > ntime version="v4.0" /> untime version="v4.0"/> ledExceptionPol icy enabled="1"/> teSources enabled="true"/> urn:schemas- microsoft- com:asm. v1"> "lib;addins" /> ding>
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<!--
The .NET 2.0 build of the console runner only
runs under .NET 2.0 or higher. The setting
useLegacyV2R
under .NET 4.0 and permits use of mixed mode
assemblies, which would otherwise not load
correctly.
-->
<startup useLegacyV2Runt
<requiredRu
<supportedR
</startup>
<runtime>
<!-- Ensure that test exceptions don't crash NUnit -->
<legacyUnhand
<!-- Run partial trust V2 assemblies in full trust under .NET 4.0 -->
<loadFromRemo
<!-- Look for addins in the addins directory for now -->
<assemblyBinding xmlns="
<probing privatePath=
</assemblyBin
</runtime>
</configuration>
With this config, I no longer see nunit-agent being started. I get the same error as with ReSharper:
No connection could be made because the target machine actively refused it 127.0.0.1:6729
I tried adding similar startup entries to app.config of my test project with the same result.
I'm going to experiment with .NET 4.5 tomorrow. Please let me know if you have other suggestions. Maybe my config file is wrong.
Regards,
Oleg.