If you ever need to create a Windows application and you use a Mac as your only workstation, it’s possible to run Windows 10 alongside macOS, read on to find out how.
How to run Windows on a Mac?
In order to create Windows apps, you will need to install Windows 10 and Visual Studio on your Mac. However, installing them directly on the hardware is not something I’d recommend.
It’s better to use a desktop virtualization program because it makes switching between macOS and Windows as simple as a swipe right.
What Desktop Virtualization Program to Use?
There are multiple desktop virtualization programs available, such as VMware Fusion, Parallels, or VirtualBox. I use
VMware Fusion* because it’s fast, has a native macOS UI, and supports a wide range of guest operating systems.
I also think the tech support from VMware is top-notch. I used to work for a company that used their
vSphere product* to run production virtual machines in a data centre, and whenever I needed help, they were one of the best companies I’ve dealt with.
Create a Windows Virtual Machine
After downloading and installing
VMware Fusion*, you are ready to create a Windows virtual machine that you can install Visual Studio on.
Follow the steps in this tutorial to learn how to create a Windows 10 virtual machine with VMware Fusion.
Install Visual Studio
Once you’ve created a virtual machine and installed Windows 10 on it. Login to Windows, open the edge browser and download the community Visual Studio installer from here.
vs_community_*.exe file when it’s finished downloading to launch the installer.
Choose what packages to install. In the following example, I’ve selected ASP.NET and web development, .NET desktop development and Universal Windows Platform development.
Go make yourself a cup of coffee while everything installs as it might take awhile.
Once finished, either create a Visual Studio online account and sign in or skip that step by clicking Not now, maybe later.
Choose your preferred development settings then click Start Visual Studio.
Visual Studio will open and you’re now ready to create a project.
Create a Windows Desktop App
Let’s create a simple Hello World app to demonstrate Visual Studio working on a Mac. Click Create a new project, select WPF App (.NET Core) then click Next.
Enter the name HelloWorld and click Create.
Add a label that says Hello World to the screen by adding a Label element inside the Grid.
Click HelloWorld next to the green play button to see how the app runs.
And that’s it! You’ve just built a native Windows app from your Mac.
In this tutorial, we learned it’s possible to develop or run Windows apps on a Mac using desktop virtualization. We installed
VMware Fusion*, created a Windows VM, installed Visual Studio, and then used it to create a Windows app that says Hello World.