Please follow this step:
Using Portability Analyzer
Use the following instructions to run Portability Analyzer.
1.Run PortabilityAnalyzer.exe (https://github.com/Microsoft/dotnet-apiport-ui/releases/download/1.1/PortabilityAnalyzer.zip)
2.In the Path to application text box enter the directory path to your Windows Forms or
WPF app (either by inserting a path string or clicking on Browse button and navigating
to the folder).
3.Click Analyze button.
4.After the analysis is complete, a report of how portable your app is right now to .NET
Core 3.0 will be saved to your disc. You can open it in Excel by clicking Open Report
button.
NET Portability Analyzer to determine if there are any APIs your application depends on that are missing from .NET Core. If there are, you need to refactor your code to avoid dependencies on APIs, not supported in .NET Core. Sometimes it’s possible to find an alternative API that provides the needed functionality.
Migration
1.Replace packages.config with PackageReference. If your project uses NuGet packages, you
need to add the same NuGet packages to the new .NET Core project. .NET Core projects
support only PackageReference for adding NuGet packages. To move your NuGet references
from packages.config to your project file, in the solution explorer right-click on
packages.config -> Migrate packages.config to PackageReference…..
2.Migrate to the SDK-style .csproj file. To move my application to .NET Core, first I need to change my project file to SDK-style format because the old format does not support .NET Core. Besides, the SDK-style format is much leaner and easier to work with.Make sure you have a copy of your current .csproj file. Replace the content of your .csproj file with the following.
For WinForms application:
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net472</TargetFramework>
<UseWindowsForms>true</UseWindowsForms>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
</PropertyGroup>
</Project>
For WPF application
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net472</TargetFramework>
<UseWPF>true</UseWPF>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
</PropertyGroup>
</Project>
3.Move from .NET Framework to .NET Standard or .NET Core. To do so, replace this
<TargetFramework>net472</TargetFramework>
with
<TargetFramework>netstandard2.0</TargetFramework>
or
<TargetFramework>netcoreapp3.0</TargetFramework>
4.In the project file copy all external references from the old project, find the proejct reference using old csproj file relpace this. for example:
<PackageReference Include="Newtonsoft.Json" Version="9.0.1" />
to .csproj file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>netcoreapp3.0</TargetFramework>
<UseWPF>true</UseWPF>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
</PropertyGroup>
</Project>
<ItemGroup>
<PackageReference Include="Newtonsoft.Json" Version="9.0.1" />
</ItemGroup>