Introduction
Visual Studio 2017 was launched on March 7, 2017 with many fresh and exciting features for Visual Studio developers, and the Xamarin Live Player was announced on stage at Build 2017 on May 11, 2017.
When developing iOS and Android apps on a Windows PC and running them on Xamarin Live Player, you don't need to setup emulator or connect the cable to deploy the code. You can have the app running from Visual Studio, either with or without the debugger, and you can enable “Live Run” mode which will constantly deploy your code as you edit it.
Setup on Windows machine
- Download and install Visual Studio 2017 15.3 Preview or above from https://www.visualstudio.com/vs/preview/
- Update Xamarin for VS 2017 from https://marketplace.visualstudio.com/items?itemName=Xamarin.XamarinUpdater
- Connect PC and device on the same Wi-Fi network.
- Xamarin Live Player will be supported only in Visual Studio, it does not work on Xamarin Studio
Setup on Mobile Device
- Download and install Xamarin Live Player on iOS device from https://itunes.apple.com/us/app/xamarin-live-player/id1228841832?ls=1&mt=8
- Download and install Xamarin Live Player on Android device from https://play.google.com/store/apps/details?id=com.xamarin.live
Step 1 Create new Xamarin.Forms application
Let's start with creating a new Xamarin project in Visual Studio.
Click on Windows Key > Select Visual Studio 2017 Preview.
Step 2 Select New Template
Go to New Project (Ctrl+Shift+N) -> select Portable Blank Xaml app.
Step 3 Select Live Player
Choose Live Player in the device list.
If you have already paired a device, it will be available as an option.
Otherwise, you'll be prompted to pair a device when required. When you press "Pair to Visual Studio", use the camera to scan the barcode showing on your computer or enter the code you see on your device screen.
You can click on Tools > Xamarin Live Player > Manage Devices.
Step 4 Run and Debug application
Select your device and run the application.
Start without debugging – you can edit the app and see the changes occur on the device.
Start debugging – you can set breakpoints and inspect variables, but the code cannot be edited.
Issues and Resolutions
I have shared some implementation, development issues, and solutions as given below.
- Mobile Device does not connect to PC
Solution
- Make sure the device and computer are on the same network
- Restart Xamarin Live player app
- If device is connected with cable, you need to disconnect and deploy the application
2. No option to select Xamarin Live Player in the device list
Solution
- Ensure you are using Visual Studio 2017 15.3 Preview from https://www.visualstudio.com/vs/preview/
- Install the Xamarin Updater from https://marketplace.visualstudio.com/items?itemName=Xamarin.XamarinUpdater
- Update all the things in Extensions & Updates under Updates > Xamarin Preview which will download the available updates.
- Close Visual Studio which auto-launches the installer for the downloaded updates.
- Relaunch Visual Studio after the installation finishes.
Summary
In this article, you learned about Xamarin Live Player ,VS system requirement, install Visual studio preview 15.3 and issue and resolution.
If you have any questions/ feedback/ issues, please write them in the comment box