Open aggieben opened 5 years ago
@akshita31 @rchande Sounds like the debugger is being told to debug the wrong process, or the xUnit is somehow being configured to run under mono instead of .NET Core.
@aggieben does your XUnit project have <TargetFrameworks>
declared in that same order?
@gregg-miskelly Yes. Here's what's in the project under test (TrueMyth.csproj
):
<TargetFrameworks>net461;netstandard2.0</TargetFrameworks>
and in the xUnit test project (TrueMyth.Test.csproj
):
<TargetFrameworks>net461;netcoreapp2.1</TargetFrameworks>
@aggieben If you swap the order so 'netstandard2.0' goes first, does it work?
I did three things and now it seems to be working; I'm not sure which of the three things might have helped:
netcoreapp2.1;net461
and netstandard2.0;net461
, respectively<TargetLatestRuntimePatch>true</TargetLatestRuntimePatch>
global.json
(which I bizarrely wasn't previously using)My guess is No. 1 was the thing that did this (thanks for the suggestion), but I really don't know.
Environment data
dotnet --info
output:VS Code version:
1.25.1
C# Extension version:1.15.2
Steps to reproduce
<TargetFrameworks>netcoreapp2.1;net461</TargetFrameworks>
;TargetFrameworks
."csharp.unitTestDebuggingOptions": { "type": "coerclr" }
in configExpected behavior
CoreCLR debugger attaches to test runner and test runs under debugger.
Actual behavior
Error in debug console: