Troubleshooting

PDF for offline use
Related Links:

Let us know how you feel about this

Translation Quality


0/250

last updated: 2017-05

Preview feature

This article explains some common problems and provides steps to correct them.

Mobile device does not connect after scanning barcode (or entering code)

Occurs when the mobile device running Xamarin Live Player is not on the same network as the computer running the IDE. Check out the following:

  • Confirm that both the device and computer are on the same WiFi network.
    • If the computer is also connected to a wired network, try unplugging the wired connection.
  • The network may be tightly secured (such as some corporate networks), blocking the ports needed by Xamarin Live Player.
  • Close the Xamarin Live Player app and restart it.

No option to select Xamarin Live Player in the device list

Xamarin Live Player support is available in Preview releases of Visual Studio 2017 on Windows and Visual Studio for Mac.

Windows

Windows users should ensure that they have the Visual Studio 2017 15.4 Preview with the Xamarin Updater installed to get the latest updates that include Xamarin Live Player support:

  1. Ensure that you are using Visual Studio 2017 15.4 Preview.
  2. Install the Xamarin Updater from the Visual Studio Marketplace:

    https://marketplace.visualstudio.com/items?itemName=Xamarin.XamarinUpdater

  3. Update all the things in Extensions & Updates under Updates > Xamarin Preview which will download the available updates.

  4. Close Visual Studio, which auto-launches the installer for the downloaded updates.
  5. Relaunch Visual Studio after the installation finishes.
  6. Open a Xamarin project and select Live Player from devices and then Run the app.
  7. Pair as directed with the Xamarin Live Player app.

    To use the live updating mode, select Tools > Xamarin Live Player > Live Run Current View (a tick will be displayed next to the option).

See these Xamarin Updater installations for more information.

Mac

Visual Studio for Mac users should switch to the Alpha channel preview.

"Error while trying to deploy" message in IDE

"IOException: unable to read data from the transport connection: Operation on non-blocking socket would block"

This error is often experienced when the mobile device running Xamarin Live Player is not on the same network as the computer running the IDE; this often happens when connecting to a device that was previously paired successfully.

  • Check that both the device and computer are on the same WiFi network.
  • The network may be tightly secured (such as some corporate networks), blocking the ports needed by Xamarin Live Player. The following ports are required for the Xamarin Live Player:
    • 37847 – Internal network access
    • 8090 – External network access

"Type or namespace cannot be found" message in IDE

Check that you have selected a Startup Project that matches your device type (iOS or Android) and that the configuration matches that device type (eg. Debug|iPhone Simulator for iOS).

"Constructor on type 'InterpretedXamarin.Forms.Button' not found" message in Player

Some system classes cannot be overridden, for example:

public class SomeCustomButton : Xamarin.Forms.Button { ... }

"MainActivity.cs: 'Resource.Layout' does not contain a definition for 'Main'"

This error occurs for Android projects with user interfaces defined in AXML files. AXML files are not currently supported in Xamarin Live Player.

Android Toolbar and Tabs render incorrectly using Xamarin.Forms

Xamarin.Forms Android projects must use "Toolbar.axml" and "Tabbar.axml" for the names of the relevant layout files. The default template uses these names; renaming them will cause rendering issues.

Please report any additional issues on bugzilla.

Xamarin Workbook

If it's not already installed, install the Xamarin Workbooks app first. The workbook file should download automatically, but if it doesn't, just click to start the workbook download manually.