The pain of developing WPF on MacOs-Silicon
A solution if you need to develop WPF with Visual Studio but you are working on a Mac-Silicon.
What is WPF?
WPF (Windows Presentation Foundation) is a graphical subsystem for Windows that provides user interface (UI) elements and allows developers to create visually rich applications. It was first introduced as part of the .NET framework in 2006.
The problem
Developing WPF on Mac Silicon (Apple's M1 chip) can be difficult because it is designed specifically for Windows and runs natively on Windows operating systems. It requires hardware virtualization to run on Mac, which can cause performance issues and limit the functionality of certain features.
Solution 1
In order to use this solution you need to have an Azure-Account or an account of an other hosting provider. If you are attending school you may have 100USD or more per year of free credits, otherwise you have to pay every hour of developing yourself.
Step 1: Azure Visual Studio
Search for "Visual Studio" and click on the Visual Studio version you want to use.
Then select the Community version if you don't have access to a higher tier.
In the following you need to enter settings for your Server. The most important setting is to allow inbound port for RDP so that you can connect.
Finally start the server.
Step 2: Install remote desktop app
In order to connect and view your server you can use a remote desktop application, which can be downloaded from AppStore. My personal preference is the Microsoft Remote Desktop app.
Click on create PC, enter the IP of your server and click on add. Congrats, you connected to your cloud server and you'r ready to work with the preinstalled Visual Studio.
Solution 2
In case you own an old windows machine you can use it as a server by running it in your home network and exposing it to the web. You can access your own windows machine in the same way as the Azure-Server.