Can I use Visual Studio for the Mac to cross compile code for Windows?

Mike Puckett 1 Reputation point
2022-12-20T20:08:03.33+00:00

I use a Mac and need to compile code that's ultimately destined for Windows. The code is in a git repository. Can I download the code on the Mac, compile it on the Mac, but then run it on Windows?

Developer technologies | Visual Studio | Setup
Developer technologies | Visual Studio | Other
Community Center | Not monitored
{count} votes

1 answer

Sort by: Most helpful
  1. Michael Taylor 60,326 Reputation points
    2022-12-20T20:25:24.31+00:00

    If you're targeting a platform that supports Windows such as .NET, .NET 6/7, Xamarin, etc and you've installed the appropriate workloads then yes you can build Windows code and then run it on Windows. Refer to the product page for more information on the platforms that are available.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.