https://developer.microsoft.com/en-us/windows/campaigns/tw-taipei
Having a WPF or WinForms application doesn’t mean you have old code. It’s active code that represents an important investment for your company. Moving your app to the next version of .NET Core will give you access to all the benefits of the Open Source version of .NET, including better performance, easier deployment and all its new features. In this session we will show how to create a new .NET Core app, why would you do it, and how to upgrade an existing project.
7. #insiderDevTour
UI Framework Options
Windows Presentation Foundation: https://github.com/dotnet/wpf
Windows Forms: https://github.com/dotnet/winforms
Windows 10 XAML: https://github.com/Microsoft/microsoft-ui-xaml
8. #insiderDevTour
.NET Core 3. Why?
Faster Side-by-Side
installation
Better packaging
options (MSIX)
Open Source .NET Standard 2.1 New Features
9. #insiderDevTour
.NET Schedule
July 2019
.NET Core 3.0
RC
Sept 2019
.NET Core 3.0
GA
Nov 2019
.NET Core 3.1
LTS
Nov 2020
.NET 5.0
GA
Nov 2021
.NET 6.0
LTS
Nov 2022
.NET 7.0
GA
Nov 2023
.NET 8.0
LTS
10. #insiderDevTour
Migrating
• .NET Portability Analyzer
• https://aka.ms/portabilityAnalyzer
• Migrate to PackageReference
• Manual process, but done by VS
• Blog Post with all steps
• https://aka.ms/porting-to-netcore3
21. #insiderDevTour
MSIX – New Packaging Format
Never regret
installing an app
No machine rot!
Auto updates
Out of the box
Easier
distribution
Store
Network or Local
file share
HTTPS public URL
Container based
on Win10
Access to
Windows 10 APIs
that requires an
App Id.
MSIX Core
Win7 support
23. #insiderDevTour
Some Resource
• 「.net core 與 .net standard 實戰教學」
• https://blog.alantsai.net/tags/「net-core-與-net-standard-實戰教學」
• Sample code used for this session
• https://github.com/microsoft/InsiderDevTourDemos19/tree/master/Sessions/desktopApps
• Modernize your desktop apps
• https://docs.microsoft.com/en-us/windows/apps/desktop/modernize/
If you ever built a Windows App, you probably had to choose over one of these three platforms
But in fact, what you really want to target is Windows. Windows is the platforms.
These options are just different UI framework options you have, when targeting Windows.
And even more, when you optimize your App to target Windows 10, you get even more innovations, APIs and benefits that the Windows 10 OS provides you.
Think of Windows as the platform.
The UI framework is just a preference
And again, all these options of UI frameworks are now open-source.
Open-Source
More performant
Great adoption and love
More frequent updates
Every even numbered release is an LTS version.
.NET 5 will unify all flavors of .NET (.NET Framework, .NET Core and Mono) in one, and Microsoft ship the first version of it in November 2020.
.Net Portability Analyzer helps you identify parts of your code that are or are not portable to .NET Core, giving you a full Excel report.
First step is to migrate from package.json to PackageReference.
Easiest way is to create an empty csproj running “dotnet new wpf” or “dotnet new winforms”.
You can use the generated csproj as a starting point, migrating your PackageReferences from your old csproj, and going from there.
Most projects should be pretty strait forward.
If you need more information, follow the steps on the blog post. It is very complete.
8 minutes
3:38
After demo
5 minutes
4:43
In 1993 Microsoft shipped Win32.
WinForms came 9 years later, in 2002.
In 2006 we shipped WPF, and in 2015, UWP.
All the innovations we have on input, like inking, touch, and Pen, inside Windows, were only available if you used UWP.
So Modern apps can only be developed with UWP? No! That’s what XAML Islands improves.
It is the technology that enables developers to modernize their apps at their own pace, using the newest UWP controls in Win32, WinForms or WPF.
Just as one example, the new Terminal you just saw uses XAML Island.
WinUI provides official native Windows UI controls and features for UWP apps.
It is the easiest way to build great Fluent Design experiences for Windows, and it’s open-source!
This is the Presentation Framework and the XAML Islands architecture.
While WinUI 2 works on multiple version of the OS, XAML Islands works only on the newest version of Windows, the May 2019 Update.
We heard the feedback that you wanted to use the greatest and latest controls, and even XAML Islands, on older version of Windows.
I’m happy to share that when we ship WinUI 3.0, you’ll be able to use controls that were shipped on newer version of Windows on older versions of Windows, all the way back to the version we released on July/2016, meaning you’ll be able to build your apps with the latest and greatest SDK and ship it without having to wait for your customers to update their Windows version. And that includes XAML Islands!
WinUI 3.0 will greatly expand the scope of WinUI to include the full native Windows UI platform.
App Manifest to set the MaxTestedVersion property
4 minutes
4:47
After demo
6 minutest
4:52