Tool:Visual Studio Enterprise 2017 15.7.2
SDK:.NET Core SDK 2.1.300 -RC1
OS:Windows 10
以下是將ASP.NET Core 2版MVC專案升級到2.1.0版筆記。
.NET Core 2.0空白專案預設如下,TargetFramework引用 netcoreapp2.0; PackageReference 參考到 Microsoft.AspNetCore.All
<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" />
</ItemGroup>
</Project>
.NET Core 2.1空白專案預設如下,TargetFramework引用 netcoreapp2.1; PackageReference 參考到 Microsoft.AspNetCore.App,沒有版本,以Microsoft.NETCore.App(2.1.0-rc1)為例:
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>netcoreapp2.1</TargetFramework>
</PropertyGroup>
<ItemGroup>
<Folder Include="wwwroot\" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.App" />
</ItemGroup>
</Project>
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="2.0.0" />
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="2.1.0-rc1-final" />
沒有留言:
張貼留言