Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I create a WPF application with .net 5 preview?

Tags:

.net

wpf

.net-5

I am trying to create a .net 5 wpf application. Is this currently possible?

I Installed .net 5 sdk and the latest VS for Windows preview.

I cannot seem to find a template other than 4.x and .net core. This makes it seem like .NET 5 doesn't support this (yet)?

Is there a way to create a WPF application in .NET 5?

like image 421
hot33331 Avatar asked Aug 27 '20 11:08

hot33331


People also ask

Does .NET 5 support WPF?

It has support for all kinds of . NET applications, including the Windows desktop platforms such as WPF, Windows Forms, and WinUI 3.0. In this article, I'll talk about what . NET 5 means for desktop developers and how to migrate your existing applications to .

Does WPF support .NET 6?

If you want to use . NET 6, and you are using an earlier version of Visual Studio, you will need to upgrade to Visual Studio 2022. Update Visual Studio to the latest version using the Visual Studio Installer. * Knowledge about how to create projects, classes, and WPF forms in Visual Studio.


1 Answers

Is there a way to create a WPF application in .NET 5?

Yes install the Preview Version of Visual Studio which until release of .Net 5, is the only version of VS which can build this type of app.

Note that it can be installed side by side with non preview version Visual studio.


Preview Steps To Create

Create a WPF project and select .Net Core:

enter image description here

Then verify its the version by doing properties on the project:

enter image description here


Note even though on the properties pages, the version control will list previous versions of .Net. That implies one could change, but moving it back causes too many errors; so I do not advise to try to downgrade back with a .Net Core WPF app.

like image 98
ΩmegaMan Avatar answered Oct 18 '22 23:10

ΩmegaMan