MSVC Compiler Quirks
Visual Studio by default uses Microsoft's proprietary compiler MSVC, which often does not compile programs that work fine on Linux compilers such as g++
or clang++
. Therefore, assignments that require submitting source code should either find a way to make Visual Studio use an open-source compiler that can be tested on Linux without any change from teachers (if you do, please edit this page!), or make sure you test your code on MSVC!
Solutions
MSVC on WINE
There are packages in the AUR that do this. It would be good to explore using them, and update this page!
Virtual machine
Install Visual Studio on a VM, and make sure the project builds and runs.
Friends
Ask a friend to check if it builds on their Windows machine!
CI/CD
It is possible to use CI/CD systems to check that a project builds. If it's not a graphical app, you can even test running it in the VM! An example setup for building .sln projects on push with GitHub Actions can be found here.
Do note that, while GitHub offers 2,000 minutes for free, using a Windows VM counts as double minutes! You only have 1,000 real minutes per month, which should still be largely enough.