Cannot create netcoreapp1.x templates after installing 2.0 CLI
See original GitHub issueInstalling 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:
- Created 6 years ago
- Comments:5 (2 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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.
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: