sdk: Error "path1 cannot be null" when invoking "dotnet run" on Linux when HOME is not set
Steps to reproduce
On Linux, invoke “dotnet run” when HOME is not set. My specific scenario was invoking “dotnet run” from an Upstart job.
Expected behavior
Works correctly or displays friendly error message.
Actual behavior
System.ArgumentNullException: Value cannot be null.
Parameter name: path1
at System.IO.Path.Combine(String path1, String path2, String path3)
at Microsoft.DotNet.ProjectModel.Resolution.PackageDependencyProvider.ResolvePackagesPath(String rootDirectory, Globa
lSettings settings)
at Microsoft.DotNet.ProjectModel.ProjectContextBuilder.Build()
at Microsoft.DotNet.ProjectModel.ProjectContext.<CreateContextForEachFramework>d__32.MoveNext()
at System.Linq.Enumerable.Count[TSource](IEnumerable`1 source)
at Microsoft.DotNet.Tools.Run.RunCommand.CalculateDefaultsForNonAssigned()
at Microsoft.DotNet.Tools.Run.RunCommand.RunExecutable()
at Microsoft.DotNet.Tools.Run.RunCommand.Start()
at Microsoft.DotNet.Tools.Run.RunCommand.Run(String[] args)
Environment data
dotnet --info output:
.NET Command Line Tools (1.0.0-beta-002275)
Product Information:
Version: 1.0.0-beta-002275
Commit Sha: 4af7437aa6
Runtime Environment:
OS Name: ubuntu
OS Version: 14.04
OS Platform: Linux
RID: ubuntu.14.04-x64
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Reactions: 12
- Comments: 20 (9 by maintainers)
I’m seeing a similar issue with CLI 1.0.0-rc4-004757, though it appears the root cause has moved from the CLI to NuGet.
My upstart script contains the following:
The call to
dotnet runfails with the following callstack:dotnet --info: