<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>netcoreapp2.2</TargetFramework>
<AspNetCoreHostingModel>InProcess</AspNetCoreHostingModel>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.App" />
<PackageReference Include="Microsoft.AspNetCore.Razor.Design" Version="2.2.0" PrivateAssets="All" />
</ItemGroup>
</Project>
TargetFramework 指定sdk版本
Microsoft.AspNetCore.App 不指定版本号 会自动取 Microsoft.NET.Sdk.Web 的版本号
ItemGroup nuget包引用集
<AspNetCoreHostingModel>
属性添加到值为 InProcess
(进程外托管使用 OutOfProcess
进行设置)的应用项目文件。如果文件中不存在 <AspNetCoreHostingModel>
属性,则默认值为 OutOfProcess