Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Debugger stopped launching after switching project to .net8 #393

Open
rolshevskyi-cvet opened this issue Nov 20, 2024 · 1 comment
Open

Comments

@rolshevskyi-cvet
Copy link

Hello, I have a test project on .net6 and execute tests from .Net Test Explorer (v0.7.8) in VS code (1.95.3).
After migrating to .net8 tests execute from .Net Test Explorer as before, but if running test in debug mode debugger is not launching at all.

Execution environment:

  1. launch.json targets /bin/Debug/net8.0/MyTestProject.dll
  2. .NET SDKs (8.0.404) - installed after deleting all other versions
  3. .NET runtimes installed:
    Microsoft.AspNetCore.App 8.0.11,
    Microsoft.NETCore.App 8.0.11,
    Microsoft.WindowsDesktop.App 8.0.11
  4. .Net Test Explorer (v0.7.8)
  5. VS code (1.95.3)
  6. NUnit (4.2.2)
  7. NUnit3TestAdapter (4.6.0)
  8. NUnit.Analyzers (4.4.0)
  9. Microsoft.NET.Test.Sdk (17.12.0)
  10. Windows 11

.Net Test Explorer output:
image

Thanks in advance for any sort of assist!

@rolshevskyi-cvet rolshevskyi-cvet changed the title Debugger stopped launching after swithing project to .net8 Debugger stopped launching after switching project to .net8 Nov 20, 2024
@rolshevskyi-cvet
Copy link
Author

For anyone how will face the same issue, the following workaround worked for me:

  1. Uninstall '.NET Core Test Explorer' extension
  2. Install 'IntelliCode for C# Dev Kit' extension (C# Dev Kit extension should be enough, but IntelliCode is recommended)
  3. Add the following to .vscode/settings.json:
    "dotnet.defaultSolution": "<SolutionName>.sln", "dotnet.unitTests.runSettingsPath": ".runsettings", - path to .runsettings file from a solution directory level
  4. Use standard VS Code Test Explorer for running and debugging tests

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant