csharp.unitTestDebuggingOptions and args property
See original GitHub issueEnvironment data
dotnet --info
output:
.NET Core SDK (reflecting any global.json):
Version: 2.1.302
Commit: 9048955601
Runtime Environment: OS Name: ubuntu OS Version: 18.04 OS Platform: Linux RID: ubuntu.18.04-x64 Base Path: /usr/share/dotnet/sdk/2.1.302/
Host (useful for support): Version: 2.1.2 Commit: 811c3ce6c0
.NET Core SDKs installed: 2.1.202 [/usr/share/dotnet/sdk] 2.1.302 [/usr/share/dotnet/sdk]
.NET Core runtimes installed: Microsoft.AspNetCore.All 2.1.2 [/usr/share/dotnet/shared/Microsoft.AspNetCore.All] Microsoft.AspNetCore.App 2.1.2 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App] Microsoft.NETCore.App 2.0.9 [/usr/share/dotnet/shared/Microsoft.NETCore.App] Microsoft.NETCore.App 2.1.2 [/usr/share/dotnet/shared/Microsoft.NETCore.App]
To install additional .NET Core runtimes or SDKs: https://aka.ms/dotnet-download
VS Code version: 1.25.1 C# Extension version: 1.15.2
Steps to reproduce
Create an MSTest project.
Create a runsettings file with parameters.
Add this settings to the workspace settings
"csharp.unitTestDebuggingOptions":{ "args":["--settings:myfile.runsettings"] }
Expected behavior
The parameters are loaded to the TestContext.Properties.
Actual behavior
Unable to access this parameters when I debug the test when reading TestContext.Properties.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:5
- Comments:7 (5 by maintainers)
Top GitHub Comments
Any progress on that issue? We have the same problem. Our projects extensively use custom variable in projects (SolutionDir) which is not present in VS Code. We configured tasks.json to provide it and it works. If running from command line we use “export SolutionDir=” (we use Linux) before running dotnet. But this variable blocks our usage of “Run Test/Debug Test” Code Lens. Providing custom options or/and variables would be very helpful.
I’ve started hitting this issue working on the DllImportGenerator project in dotnet/runtimelab.