I have been using Visual Studio Code in Ubuntu Linux for a while, but it was not an easy process to get it working the first time.
I just got around to installing .NET Core 3.1 and hit a familiar problem –
The terminal shell path "dotnet" is a directory
This happens when I try to build inside VS Code using a build task, I point this out because building from a terminal inside VS Code works fine.
Here is the output –
> Executing task: dotnet build /home/bryan/dev/blog/SomeProject/SomeProject.csproj /property:GenerateFullPaths=true /consoleloggerparameters:NoSummary < The terminal shell path "dotnet" is a directory Terminal will be reused by tasks, press any key to close it.
If you google this you will find some suggested fixes but they didn’t work for me.
Here is what does work for me –
1. Install the SDKs to a directory NOT named dotnet, my SDK’s are in
2. Update your PATH to include this directory –
3. Update your
DOTNET_ROOT to this –
That’s what works for me.
Whenever I need to install a new SDK I have do follow the manual steps outlined
here, making sure to unpack the SDK to
Hope this works for you, please leave a comment if it does or even if it doesn’t.