New projects are not created referencing netcoreapp1.1
See original GitHub issueAfter 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:
- Created 7 years ago
- Comments:11 (7 by maintainers)
Top GitHub Comments
yep, you can leave the SDK at that version.
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.