共用方式為


Desktop development features of .NET Core 3.0 Preview 1

At Connect(); 2018, Announced releasing .NET Core 3.0 Preview 1. In this release, it has very interesting features for Windows Desktop app developers.

WPF and Windows Forms support

In .NET Core 3.0 Preview 1, We can use WPF and Windows Forms. It is very easy. You just type below commands.

dotnet new wpf

or

dotnet new winforms

The commands generate the project files. The below screenshots are opening the projects on Visual Studio 2019 Preview.

Designer feature isn’t yet. However, you can launch the apps and debug on VS 2019 Preview.

Can use .NET Framework libraries?

.NET Core 3.0 supports .NET Standard libraries. However, almost all WPF/WinForms apps depends libraries that are targeted .NET Framework, for example: Prism.

We can add the packages using NuGet package manager, however the below warning is occurred.

In this case, you can check the compatibility using .NET Portability Analyzer.

The .NET Portability Analyzer

The previous link describes Visual Studio plugin. However VS2019 doesn’t support the extension yet. You can download the CLI tools from below link:

Microsoft/dotnet-apiport releases page

And you can analyze compatibility by below command.

"path to ApiPort.exe directory"\ApiPort.exe analyze -f .

After that, the report is generated:

You can check compatibility, and then you can ignore the warnings on the properties window of Visual Studio 2019 as your discretion.

Conclusion

.NET Core 3.0 is preview status yet. However, you can try it now. You can evaluate your WPF/WinForms apps on .NET Core 3.0.

.NET Core 3.0 is high performance than .NET Framework. And you can use self-contained deployment feature that is include runtime to your deployment package.(It means that .NET Core 3.0 doesn’t need on deployment target machine.)

.NET Core application deployment

Have a fun programming.