I just create a simple ClassLibrary project with VS2017 preview 2.1. I create using .NET Core project template. When I check in project details, I see it targets .NET standard 2.0. How I may target .NET Core 2.0 (that implement a larger number of API according to a test made with API-Port tool)
-
1I don't think so. Just tried several time using VS2017 15.3/2.1 and in project properties you cannot select .NET Core. It might be a limitation of this release or maybe you need to use CLI to target directly .NET Core 2.0? – John Doe Jun 24 '17 at 17:03
4 Answers
Update: The templates have been fixed in a recent update to VS 2017 15.3 Preview.
This really looks like an issue with the templates, I also created a project from the "Class Library (.NET Core)" template and it targeted .NET Standard 2.0.
However, this can easily be fixed by editing the csproj file manually from
<TargetFramework>netstandard2.0</TargetFramework>
to
<TargetFramework>netcoreapp2.0</TargetFramework>
This project type allows editing the csproj file while the project is loaded by right-clicking on the project and selecting "Edit {project}.csproj".

- 94,744
- 25
- 252
- 217
It looks you may create a .NET Core app with VS2017 targeting .NET Core 2.0, but as soon you create a .NET Core project library, it targets .NET standard, it might be a limitation of this preview of VS2017.

- 113
- 8
I'm on Visual Studio 2017: Community.
I installed the SDK found here: https://www.microsoft.com/net/download/thank-you/dotnet-sdk-2.1.3-windows-x64-installer
You should be able to see the NET Core 2.0 as the target framework when creating your project.

- 37
- 3
- 5