Targeting different .NET Framework versions in the .csproj files of your projects
For every project that Visual Studio 2017 generates, it creates a corresponding .csproj
file, which includes several project-wide settings such as the referenced assemblies, the .NET Framework target versions, the included files and folders, as well as multiple others.
For example, when opening the ASP.NET Core 2.0 project you created before, you can see the following structure:
<Project Sdk="Microsoft.NET.Sdk.Web"> <PropertyGroup> <TargetFramework>netcoreapp2.0</TargetFramework> </PropertyGroup> <ItemGroup> <Folder Include="wwwroot\" /> </ItemGroup> <ItemGroup> <PackageReference Include="Microsoft.AspNetCore.All" Version="2.0.0-preview2-final" /> </ItemGroup> </Project>
You can see the TargetFramework
setting, which allows you to define what .NET Framework...