Home > Mobile >  How to write native C in VS 2022, using Linux for build and test
How to write native C in VS 2022, using Linux for build and test

Time:03-22

I need a native C app to make from scratch. It has to run on linux (CentOS). I want to use VS2022 to write and test. I have Hyper-V VM with CentOS.

I tried to google a solution but there are only posts for using WSL.

Can someone please describe steps to connect VS to Linux VM instead of WSL so I can build and run the app on the VM.

CodePudding user response:

This article describes the process: https://devblogs.microsoft.com/cppblog/linux-development-with-c-in-visual-studio/

  • add workload to the VS using VS Installer (Linux and embedded..)
  • create project of correct type
  • add SSH credentials in the project Properties (also can be added/removed/edited in Tools-Options-Cross Platform)
  • Related