Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Targeting .NET Core 2.0

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)

like image 605
Robert II Avatar asked Dec 18 '22 06:12

Robert II


1 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".

like image 101
Martin Ullrich Avatar answered Dec 29 '22 00:12

Martin Ullrich