Skip to content

Unable to install templates on Ubuntu 18.04 after upgrading to 2.1.302 #9613

@NatElkins

Description

@NatElkins

Steps to reproduce

Try installing any dotnet template with dotnet version 2.1.302 on Ubuntu 18.04. For example, dotnet new -i "Amazon.Lambda.Templates::*". But it happens with any of them.

Expected behavior

The templates should install without any issues.

Actual behavior

You'll get an error like:

nathaniel@nelknet:~/Projects$ dotnet new -i "Amazon.Lambda.Templates::*"
  Restoring packages for /home/nathaniel/.templateengine/dotnetcli/v2.1.302/scratch/restore.csproj...
/usr/share/dotnet/sdk/2.1.302/NuGet.targets(114,5): error : Unable to load the service index for source https://api.nuget.org/v3/index.json. [/home/nathaniel/.templateengine/dotnetcli/v2.1.302/scratch/restore.csproj]
/usr/share/dotnet/sdk/2.1.302/NuGet.targets(114,5): error :   The type initializer for 'System.Net.Http.HttpConnectionPool' threw an exception. [/home/nathaniel/.templateengine/dotnetcli/v2.1.302/scratch/restore.csproj]
/usr/share/dotnet/sdk/2.1.302/NuGet.targets(114,5): error :   Version's parameters must be greater than or equal to zero. [/home/nathaniel/.templateengine/dotnetcli/v2.1.302/scratch/restore.csproj]
/usr/share/dotnet/sdk/2.1.302/NuGet.targets(114,5): error :   Parameter name: revision [/home/nathaniel/.templateengine/dotnetcli/v2.1.302/scratch/restore.csproj]

and the templates will not be installed.

Environment data

dotnet --info output:

nathaniel@nelknet:~/Projects$ dotnet --info
.NET Core SDK (reflecting any global.json):
 Version:   2.1.302
 Commit:    9048955601

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

Host (useful for support):
  Version: 2.1.2
  Commit:  811c3ce6c0

.NET Core SDKs installed:
  2.0.2 [/usr/share/dotnet/sdk]
  2.1.4 [/usr/share/dotnet/sdk]
  2.1.302 [/usr/share/dotnet/sdk]

.NET Core runtimes installed:
  Microsoft.AspNetCore.All 2.1.2 [/usr/share/dotnet/shared/Microsoft.AspNetCore.All]
  Microsoft.AspNetCore.App 2.1.2 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 2.0.0 [/usr/share/dotnet/shared/Microsoft.NETCore.App]
  Microsoft.NETCore.App 2.0.5 [/usr/share/dotnet/shared/Microsoft.NETCore.App]
  Microsoft.NETCore.App 2.1.2 [/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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions