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.

Cannot create netcoreapp1.x templates after installing 2.0 CLI

See original GitHub issue

Installing the 2.0 CLI makes netcoreapp1.x templates inaccessible

Repro Install .NET Core SDK 1.0.4 dotnet new web --framework netcoreapp1.1. Works 😄

Install .NET Core SDK 2.0.0 dotnet new web --framework netcoreapp1.1.

Expected The template system sees that both a 1.0 and 2.0 SDK are installed and fallsback to the 1.0 SDK for frameworks the 2.0 SDK doesn’t include

Actual

Error: Invalid parameter(s):
--framework netcoreapp1.1
    'netcoreapp1.1' is not a valid value for --framework (Framework).

Workaround Before invoking dotnet new, create a global.json file and point dotnet to the old version.

{ "sdk": { "version": "1.0.4" }}

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
AnupSingh2008commented, Dec 2, 2017

In your system higher version of core is available. So to fix the issue type this command dotnet new mvc --language C# --auth None --framework netcoreapp2.1 and it will work.

Always version which is installed in your system.

1reaction
seancpeterscommented, Jul 26, 2017

This is actually by design. The dotnet CLI 2.x does not ship with the 1.x templates because the 2.x CLI does not carry the 1.0/1.1 runtimes. But you can install the 1.x templates on your 2.x CLI install. To install them, add this myget feed to your global NuGet.config: https://dotnet.myget.org/F/templating/api/v3/index.json, and then install the desired template packs using one or more of these commands:

dotnet new -i Microsoft.DotNet.Common.ProjectTemplates.1.x::1.0.0-*
dotnet new -i Microsoft.DotNet.Test.ProjectTemplates.1.x::1.0.0-*
dotnet new -i Microsoft.DotNet.Web.ProjectTemplates.1.x::1.0.0-*
Read more comments on GitHub >

github_iconTop Results From Across the Web

Issue with setting up Q#: Command Line Project Templates ...
Hi, I am having trouble installing the command line project templates for Q# in VS Code. I am following the instructions on Microsoft...
Read more >
dotnet new project can't restore it's dependencies
I wanted to create a web app using mvc6 and searched for ASP.NET 5 preview templates in ASP.NET web application(.Net Framework) i couldn't...
Read more >
Can not find runtime target for framework .NETCoreApp=v1 ...
I am getting the following error when I try dotnet run : Can not find runtime target for framework '.NETCoreAPP, Version=v1.0' compatible with ......
Read more >
dotnet new <TEMPLATE> - .NET CLI
The dotnet new command creates new .NET projects based on the specified template.
Read more >
"Cannot Detect .net Core 1.0" in New Project dialog - YouTrack
Solution with a mix of netcoreapp1.0 and netcoreapp2.0 projects. All build okay. But on the Add New Project dialog, under .NET Core, this...
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