0

I am relatively new to dotnet development. I am setting us my VSCode environment and attempting to use the C# Dev Kit to run tests within a project I am in. The project can run dotnet restore/test etc, however my VSCode does not find tests, even if I run dotnet build. I had dotnet sdk installed but I even using the .Net Install Tool extension to install it again. My "dotnet" get placed in "/usr/local/share/dotnet" however when I look at the C3 Dev Kit - Test Explorer output I can see it's trying to pull from wrong location

0 tests discovered from  in 28.2316 ms
System.Exception: An error occurred when opening the file /usr/local/bin/dotnet with arguments "/usr/local/share/dotnet/sdk/8.0.302/vstest.console.dll" /parentprocessid:49332 /port:60215.
 ---> System.ComponentModel.Win32Exception (2): An error occurred trying to start process '/usr/local/bin/dotnet' with working directory '/Users/{USERNAME}/github/{PRIVATE-REPO}'. No such file or directory
   at System.Diagnostics.Process.ForkAndExecProcess(ProcessStartInfo startInfo, String resolvedFilename, String[] argv, String[] envp, String cwd, Boolean setCredentials, 

I can see it's looking in /usr/local/bin/dotnet and not /usr/local/share/dotnet. Using the extension I tried to override the property

I tried restarting and did not work. Additionally I tried creating a symlink

sudo ln -s /usr/local/share/dotnet/dotnet /usr/local/bin/dotnet

The extension in VSCode still fails with the same error. Any tips?

I want to be able to successfully run tests using the C# Dev Kit for Test Explorer

1 Answer 1

0

A previous version of the .net sdk 8.0 had placed a symlink. When i created new symlink it actually failed I wasn't paying attention. Log from C3 dev was because the old symlink was no longer valid.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.