Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xamarin.Forms on VSCode

Is there any way to develop and run a Xamarin.forms application in VS CODE instead of Visual studio 2022?

Has anyone tried and succeeded?

like image 301
Cesar Menchão Avatar asked Aug 07 '26 06:08

Cesar Menchão


1 Answers

There's several things Visual Studio does as an IDE for your Xamarin applications-

  1. develop (edit code)
  2. build (compile)
  3. deploy (install),
  4. debug (while running)

Using VSCode and Xamarin code,

  1. Yes, you can obviously develop on VSCode since it's like any other text editor, which works well for most of Xamarin Forms (except the iOS LaunchScreen that uses a Storyboard file)
  2. Yes, You can also build using VSCode's inbuilt terminal using commands like this msbuild Sample.iOS/Sample.iOS.csproj /verbosity:normal /t:Rebuild /p:Platform=iPhoneSimulator /p:Configuration=Debug
  3. Yes, after building, you can deploy to a simulator using commands like this xcrun simctl install booted Sample.iOS.app
  4. No, you can't debug while running the app or place breakpoints.

I have written about deploying Xamarin apps from VS Code in detail. Surprisingly, you can also deploy Xamarin apps directly to the Apple AppStore and it takes less than a minute. With MAUI, thanks to Uno's VS code plugin, you can also debug while running

like image 74
Saamer Avatar answered Aug 09 '26 18:08

Saamer