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.

New projects are not created referencing netcoreapp1.1

See original GitHub issue

After installing SDK + Runtime 1.1 I would expect to have new projects created targeting netcoreapp1.1 as by what was written in the blog announcing .NET Core 1.1, but what I get is csproj file referencing netcoreapp1.0

The dotnet new command creates new templates that reference the latest runtime on the machine. This may not be desired. If not, you can hand-edit the versions in the resulting project.json to earlier version numbers. Based on feedback, we will be changing this behavior in the new version of the tools, at the same time we release the final version of Visual Studio 2017. If you do not use dotnet new to create new projects, but rely on Visual Studio, then you are not affected.

I know I can just edit it manually but it’s very confusing, especially given the explanation in the post that says the opposite should happen.

Steps to reproduce

Install “current” version of SDK 1.1 launch dotnet new

Expected behaviour

Given the description on the blog announcing .NET Core 1.1 I’expect the project.csproj file to reference netcoreapp1.1

<TargetFramework>netcoreapp1.1</TargetFramework>
...
  <ItemGroup>
    <PackageReference Include="Microsoft.NETCore.App">
      <Version>1.1.0</Version>
    </PackageReference>

Actual behaviour

I still get a reference to netcoreapp 1.0

<TargetFramework>netcoreapp1.0</TargetFramework>
...
  <ItemGroup>
    <PackageReference Include="Microsoft.NETCore.App">
      <Version>1.0.1</Version>
    </PackageReference>

Environment data

dotnet --info output:

.NET Command Line Tools (1.0.0-preview3-004056)

Product Information:
 Version:            1.0.0-preview3-004056
 Commit SHA-1 hash:  ccc4968bc3

Runtime Environment:
 OS Name:     Windows
 OS Version:  10.0.10586
 OS Platform: Windows
 RID:         win10-x64

I checked and 1.1.0 is installed

 Directory of C:\Program Files\dotnet\shared\Microsoft.NETCore.App

19/11/2016  22:21    <DIR>          .
19/11/2016  22:21    <DIR>          ..
17/07/2016  16:06    <DIR>          1.0.0
19/05/2016  20:00    <DIR>          1.0.0-rc2-3002702
07/11/2016  21:05    <DIR>          1.0.1
20/11/2016  01:09    <DIR>          1.1.0
               0 File(s)              0 bytes
               6 Dir(s)   2,629,787,648 bytes free

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
TheRealPiotrPcommented, Nov 24, 2016

yep, you can leave the SDK at that version.

1reaction
TheRealPiotrPcommented, Nov 22, 2016

preview 2.1 comes with runtime 1.1 so you would be good to go.

Personally, I’d install preview3, install 1.1, and manually bump the version number in the generated templates to 1.1. I don’t see much benefit in using the project.json tooling if a project is being created from scratch.

Read more comments on GitHub >

github_iconTop Results From Across the Web

New projects are not created referencing netcoreapp1.1
After installing SDK + Runtime 1.1 I would expect to have new projects created targeting netcoreapp1.1 as by what was written in the...
Read more >
Can't reference other projects from ASP.NET Core project
And one of the referenced projects: <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <TargetFramework>netcoreapp1.1</TargetFramework> ...
Read more >
Target frameworks in SDK-style projects - .NET
For example, win81 is an equivalent TFM to netcore451 . Target Framework, TFM .NET 5+ (and .NET Core), netcoreapp1.0 netcoreapp1.1
Read more >
VS 2019 RC new projects are incomplete
NET console project that was created with VS 2015. Initial loading had only one problem - The references to the .NET assemblies were...
Read more >
Creating your first shared library in .NET Core - DevTrends
NET Core class libraries reference netcoreapp: <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <TargetFramework>netcoreapp1.1</TargetFramework> ...
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