question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unable to create a dotnet project in debian x64 - Kali linux 2017.1

See original GitHub issue

From @AhmedHussainy on September 16, 2017 9:21

Steps to reproduce

dotnet new console -o example --lang c#

Expected behavior

making a console application in the current directory.

Actual behavior

first time it showed me this …

Getting ready… Segmentation fault

second time it showed me this…

Getting ready...
Error: Could not install "/usr/share/dotnet/sdk/2.0.0/Templates/microsoft.dotnet.web.projecttemplates.2.0.1.0.0-beta2-20170803-303.nupkg".
Error: Error reading JObject from JsonReader. Path '', line 0, position 0.
Error: Could not install "/usr/share/dotnet/sdk/2.0.0/Templates/microsoft.dotnet.web.itemtemplates.1.0.0-beta2-20170803-303.nupkg".
Error: Error reading JObject from JsonReader. Path '', line 0, position 0.
Error: Could not install "/usr/share/dotnet/sdk/2.0.0/Templates/microsoft.dotnet.common.projecttemplates.2.0.1.0.0-beta2-20170803-303.nupkg".
Error: Error reading JObject from JsonReader. Path '', line 0, position 0.
Error: Could not install "/usr/share/dotnet/sdk/2.0.0/Templates/microsoft.dotnet.web.spa.projecttemplates.1.0.417.nupkg".
Error: Error reading JObject from JsonReader. Path '', line 0, position 0.
Error: Could not install "/usr/share/dotnet/sdk/2.0.0/Templates/microsoft.dotnet.test.projecttemplates.2.0.1.0.0-beta2-20170803-303.nupkg".
Error: Error reading JObject from JsonReader. Path '', line 0, position 0.
Error: Could not install "/usr/share/dotnet/sdk/2.0.0/Templates/microsoft.dotnet.common.itemtemplates.1.0.0-beta2-20170803-303.nupkg".
Error: Error reading JObject from JsonReader. Path '', line 0, position 0.
Object reference not set to an instance of an object.
   at Microsoft.TemplateEngine.Edge.Settings.SettingsLoader.Save(TemplateCache cacheToSave)
   at Microsoft.TemplateEngine.Edge.Settings.SettingsLoader.Save()
   at Microsoft.TemplateEngine.Cli.Installer.InstallPackages(IEnumerable`1 installationRequests)
   at Microsoft.DotNet.Tools.New.NewCommandShim.FirstRun(IEngineEnvironmentSettings environmentSettings, IInstaller installer)
   at Microsoft.TemplateEngine.Cli.New3Command.ConfigureEnvironment()
   at Microsoft.TemplateEngine.Cli.New3Command.Initialize()
   at Microsoft.TemplateEngine.Cli.New3Command.<ExecuteAsync>d__59.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
   at Microsoft.TemplateEngine.Cli.CommandParsing.NewCommandInputCli.<>c__DisplayClass19_0.<<OnExecute>b__0>d.MoveNext()

Environment data

dotnet --info output:

.NET Command Line Tools (2.0.0)

Product Information:
 Version:            2.0.0
 Commit SHA-1 hash:  cdcd1928c9

Runtime Environment:
 OS Name:     kali
 OS Version:  2017.1
 OS Platform: Linux
 RID:         linux-x64
 Base Path:   /usr/share/dotnet/sdk/2.0.0/

Microsoft .NET Core Shared Framework Host

  Version  : 2.0.0
  Build    : e8b8861ac7faf042c87a5c2f9f2d04c98b69f28d

Copied from original issue: dotnet/cli#7671

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:11 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
GangWang01commented, Sep 16, 2022

Presently on Debian supported distributions are .NET Core 3.1 and .NET 6 according to https://docs.microsoft.com/en-us/dotnet/core/install/linux-debian#supported-distributions. Verified with the following environment, the issue was not reproduced anymore for both .NET Core 3.1 and .NET 6. The first run of dotnet new and creating project worked well.

dotnet --info
.NET SDK (reflecting any global.json):
Version:   6.0.401
Commit:    0906eae6f8

Runtime Environment:
OS Name:     kali
OS Version:  2019.2
OS Platform: Linux
RID:         linux-x64
Base Path:   /usr/share/dotnet/sdk/6.0.401/

global.json file:
  Not found

Host:
  Version:      6.0.9
  Architecture: x64
  Commit:       163a63591c

.NET SDKs installed:
  3.1.423 [/usr/share/dotnet/sdk]
  6.0.401 [/usr/share/dotnet/sdk]

.NET runtimes installed:
  Microsoft.AspNetCore.App 3.1.29 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 6.0.9 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 3.1.29 [/usr/share/dotnet/shared/Microsoft.NETCore.App]
  Microsoft.NETCore.App 6.0.9 [/usr/share/dotnet/shared/Microsoft.NETCore.App]
0reactions
vlada-shubinacommented, Sep 22, 2022

Thanks @GangWang01 for double checking, closing the issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Install the .NET SDK or the .NET Runtime on Debian
Demonstrates the various ways to install .NET SDK and .NET Runtime on Debian.
Read more >
How to run a .NET Core console application on Linux
I am using Visual Studio 2015 and created a .NET Core console application. After compiling, I have my project DLL file in the...
Read more >
apt-get update GPG error, key expired [Archive]
Hello, I am trying to update Kali using the command apt-get update and I am receiving the following error:
Read more >
<SOLVED> WINE & .NET Framework Installation
The Scrivener application opens but I can't register it due to a .NET framework problem. The error message is attached. If neither 4.5...
Read more >
Getting started with .NET for Linux
The key things to note are: The project name matches the directory name (i.e., "helloworld"); the code was build using a template (console ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found