问题
We currently have an ASP.NET Core 2.2 web app that we would like to migrate to 3.1 (as it's newer and contains several enhancements). There are articles on migrating from 2.2 to 3.0 but not 2.2 to 3.1.
Is the preferred migration route to upgrade to 3.0 first then upgrade to 3.1? There seem to be a lot of incompatibilities between 2.2 and the newer 3.0 / 3.1 frameworks.
Are there any best practices / general guidelines for upgrading an existing ASP.NET Core 2.2 web app to 3.0 / 3.1?
回答1:
There is no official documents to directly migrate from 2.2 to 3.1. Actually microsoft encourage migrate version by version.
Most break change are made when migrate from 2.2 to 3.0, and 3.0 to 3.1 only have some config updates(you can easily tell that 3.0 to 3.1 migrate docs are much more shorter than 2.2 to 3.0). Mostly a package reference update and framework version update from 3.0 to 3.1.
Briefly speaking, if you are migrating from 2.2 to 3.1. accomplish 2.2 to 3.0 contributes 90% of the work you have to do, 3.0 to 3.1 just contributes 10% of the entire migration. Major change between 3.0 and 3.1 are SameSite attribute.
来源:https://stackoverflow.com/questions/60184327/migrating-from-asp-net-core-2-2-to-3-1