C_API Example Projects won't build in Visual Studio

Hello !
I'm having trouble with building a project using C.

I downloaded the SDK on Windows and made a super simple test based on the example projects in C using Visual Studio 2022. It runs in the simulator, but every time I try to upload it to my PlayDate I get the same error: Couldn't find pdz file main.pdz. If I do the same for the Hello World example (unmodified) I get the same error.

I did read that you could make a build for release, so I created a new folder called "build_release" and ran cmake -DCMAKE_TOOLCHAIN_FILE="<path to SDK>/C_API/buildsupport/arm.cmake" ...
If I open the generated .sln file and try to run it, I get a build error invalid numeric argument '/Wno-unknown-pragmas'.

I've never used cmake before so perhaps I'm doing something wrong. Could anyone help with this? Thanks : )

You also need the correct generator argument on the cmake args list. For Windows, it's nmake makefiles. Device builds won't run/build in VS, they use the gcc arm compiler and only run on the device. See here: Inside Playdate with C