In Microsoft's documentation on "Overview of the porting process" here in point #1 they mentions following
Retarget all projects you wish to port to target .NET Framework 4.7.2 or higher. This step ensures that you can use API alternatives for .NET Framework-specific targets when .NET Core doesn't support a particular API.
Can someone please help me to understand second sentence with some example? I failed to understand why it is needed to target projects to .Net Framework 4.7.2 before porting to .Net Core.
In another link they mentions following thing
The versions listed here represent the rules that NuGet uses to determine whether a given .NET Standard library is applicable. While NuGet considers .NET Framework 4.6.1 as supporting .NET Standard 1.5 through 2.0, there are several issues with consuming .NET Standard libraries that were built for those versions from .NET Framework 4.6.1 projects. For .NET Framework projects that need to use such libraries, we recommend that you upgrade the project to target .NET Framework 4.7.2 or higher.
Any idea what issues they are talking about here? (highlighted in bold above)
You can migrate your old project to the Core project using the 'dotnet migrate; command, which migrates the project. json and any other files that are required by the web application. The dotnet migrate command will not change your code in any way.
Microsoft has made tremendous advancements in its cross-platform, open-source . Net Core, which is why there are many reasons to migrate from the classic . Net Framework. 124,934 active websites using ASP.NET Core; additionally, 51,043 sites used it historically.
NET Core focuses to develop apps in a variety of domains like gaming, mobile, IoT, AI, etc. . NET Framework is limited to window OS. Mobile.NET Core is compatible with various operating systems-Windows, Linux, and Mac OS.
While .NET Framework 4.6.1 technically supports .NET Standard 2.0, there were some inadvertent omissions from 4.6.1 that means it doesn't actually support the full Standard 2.0 API surface without additional NuGet packages. This was only corrected in Framework 4.7.2.
Hence if you're looking to migrate to Core, it's safest to first migrate your code to Framework 4.7.2. That way any of the "patch" NuGet packages, that aren't necessary in Core/Standard (and will actually cause problems if present), will no longer be present.
Libraries that are built in versions of Framework before 4.7.2 will also pull in these additional packages, with the same results. But if your code is on 4.7.2 then the built-in APIs will be used, again making the extra packages unnecessary.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With