Skip to content

Dotnet run works only as root #10234

Open
@hamzahamidi

Description

@hamzahamidi

Steps to reproduce

I was following the official dotnet tutorial https://dotnet.microsoft.com/learn/dotnet/hello-world-tutorial/create . When I try to run the application ( dotnet run) I get this error:

projects/dotnet-core-starter/dotnet-core-starter.csproj : error MSB4236: The SDK 'Microsoft.NET.Sdk' specified could not be found.

sudo dotnet run works as expected!

Expected behavior

Actual behavior

projects/dotnet-core-starter/dotnet-core-starter.csproj : error MSB4236: The SDK 'Microsoft.NET.Sdk' specified could not be found.

Environment data

dotnet --info output:

.NET Core SDK (reflecting any global.json):
 Version:   2.2.203
 Commit:    e5bab63eca

Runtime Environment:
 OS Name:     ubuntu
 OS Version:  18.04
 OS Platform: Linux
 RID:         ubuntu.18.04-x64
 Base Path:   /usr/share/dotnet/sdk/2.2.203/

Host (useful for support):
  Version: 2.2.4
  Commit:  f95848e524

.NET Core SDKs installed:
  2.2.203 [/usr/share/dotnet/sdk]

.NET Core runtimes installed:
  Microsoft.AspNetCore.All 2.2.4 [/usr/share/dotnet/shared/Microsoft.AspNetCore.All]
  Microsoft.AspNetCore.App 2.2.4 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 2.2.4 [/usr/share/dotnet/shared/Microsoft.NETCore.App]

To install additional .NET Core runtimes or SDKs:
  https://aka.ms/dotnet-download





Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions