I was able to fix this by adding the /restore parameter to the msbuid command. So now my msbuild command looks like:
msbuild.exe appserver\%~1\%~1.sln /restore /target:Clean,Build /p:Configuration=Debug /p:platform="%platform%"
This seems to properly restore the sdk style project's dependencies and the build now completes using the gitlab runner