我有一个旧的应用程序在ASP.NET Core 2.1 and running on .NET Framework(是的,that is a thing)上运行.
好吧,好吧.但我需要更新旧项目,以包括一些new updates-专门打补丁的UseCookiePolicy
支持-如https://devblogs.microsoft.com/dotnet/upcoming-samesite-cookie-changes-in-asp-net-and-asp-net-core/comment-page-3/所述-以及一些其他安全补丁).
从csproj文件中提取:
<TargetFramework>net48</TargetFramework>
<AspNetCoreModuleName>AspNetCoreModuleV2</AspNetCoreModuleName>
<AspNetCoreHostingModel>OutOfProcess</AspNetCoreHostingModel>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore" Version="2.1.7" />
<PackageReference Include="Microsoft.AspNetCore.Mvc" Version="2.1.3" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.Cookies" Version="2.1.2" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.Core" Version="2.1.1" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.Versioning" Version="3.0.1" />
<PackageReference Include="Microsoft.Extensions.Configuration" Version="2.1.1" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="2.1.1" />
</ItemGroup>
所以我们可以看到ASP.NET核心依赖项是通过NuGet引用的.
好吧,好吧-所以我需要go 更新那些软件包.但问题来了-包裹don't exist any more.https://www.nuget.org/packages/Microsoft.AspNetCore/2.1.7是最新的版本,但唉,这是之前发布的修复,我需要.https://github.com/dotnet/announcements/issues/217是他们宣布将停止生成NuGet包的公告.
所以现在我有点被卡住了.我可以从https://github.com/dotnet/core/blob/main/release-notes/2.1/2.1.30/2.1.30.md#downloads下载最新的SDK等--但我如何将我的项目从其NuGet引用更改为C:\Program Files\DotNet\Shared中的文件?
You may be tempted to suggest using 100 - but that doesn't work either since it explicitly excludes .NET Framework support.
.NET框架上的.NET Core 2.1是受支持的东西.其他人如何解决这个升级问题?