Visual Studio not deploying debug version of app to Live Player device

DavidH_1997DavidH_1997 Member ✭✭

My application has always been deploying fine to my phone using the Live Player tool, I was testing fine even as recently as an hour or two ago. However, suddenly it has stopped deploying. It goes through the usual process and says "Deploy to Samsung SM-J500FN Player succeeded" in Visual Studio, and in the Live Player on my phone it says "Connected to Visual Studio", but the app does not appear. I've not changed any of the settings, all I've done since it last worked is follow this link to add a customer renderer to my project.

https://docs.microsoft.com/en-us/xamarin/xamarin-forms/app-fundamentals/custom-renderer/entry

Has anyone else experienced this, or have any suggestions? I've tried cleaning and rebuilding, as well as rebuilding each project one-by-one, but still the same issue was occurring.

UPDATE:

Upon further investigation, it appears that it was because in my xaml code, adding a custom entry was causing the issue, as it couldn't add it to the designer.

This is the problematic code:

 <local:MyEntry x:Name="txtFirstName"
   Placeholder="First Name"
   Keyboard="Text"
   TextColor="DarkBlue" 
   PlaceholderColor="DarkBlue"
   Completed="NameCompleted"
   HorizontalOptions="Start"
   WidthRequest="300"
   Text="{Binding FirstName, Mode=TwoWay}"
 />

Am I not supposed to set the properties of a custom entry control in xaml?

If that is the case, I need 2 custom entry controls, both with a couple of different properties to the other, so would I need 2 custom renderers for this, or am I misunderstanding how to set the properties of a custom renderer?

Best Answer

Answers

  • JGoldbergerJGoldberger USMember, Forum Administrator, Xamarin Team, University Xamurai
    edited June 2018

    @DavidH_1997

    This is because custom renderers are not support in Xamarin Live Player. See: https://docs.microsoft.com/en-us/xamarin/tools/live-player/limitations?tabs=ios#limitations

    There are some limitations on the things Xamarin Live Player can run, including the items below:

    Xamarin.Forms

    • Custom Renderers are not supported.
    • Effects are not supported.
    • Custom Controls with Custom Bindable Properties are not supported.
    • Embedded resources are not supported (ie. embedding images or other resources in a PCL).
    • Third party MVVM frameworks are not supported (ie. Prism, Mvvm Cross, Mvvm Light, etc.).
    • Asset Catalogs on iOS are not supported.

    You might want to use Xamarin Live Reload instead if you are using VS Windows (not available for VS for Mac yet):
    https://docs.microsoft.com/en-us/xamarin/xamarin-forms/xaml/live-reload

    Xamarin Live Reload enables you to make changes to your XAML and see them reflected live, without requiring another compile and deploy. Any changes made to your XAML will be redeployed on save and reflected on your deploy target.
    Because your app is compiled when using Live Reload, it works with all libraries and third-party controls. Live Reload works on all platforms Xamarin.Forms supports, including Android, iOS, and UWP, and works on all valid deployment targets, including simulators, emulators, and physical devices.

  • DavidH_1997DavidH_1997 Member ✭✭

    @JGoldberger said:
    @DavidH_1997

    This is because custom renderers are not support in Xamarin Live Player. See: https://docs.microsoft.com/en-us/xamarin/tools/live-player/limitations?tabs=ios#limitations

    There are some limitations on the things Xamarin Live Player can run, including the items below:

    Xamarin.Forms

    • Custom Renderers are not supported.
    • Effects are not supported.
    • Custom Controls with Custom Bindable Properties are not supported.
    • Embedded resources are not supported (ie. embedding images or other resources in a PCL).
    • Third party MVVM frameworks are not supported (ie. Prism, Mvvm Cross, Mvvm Light, etc.).
    • Asset Catalogs on iOS are not supported.

    You might want to use Xamarin Live Reload instead if you are using VS Windows (not available for VS for Mac yet):
    https://docs.microsoft.com/en-us/xamarin/xamarin-forms/xaml/live-reload

    Xamarin Live Reload enables you to make changes to your XAML and see them reflected live, without requiring another compile and deploy. Any changes made to your XAML will be redeployed on save and reflected on your deploy target.
    Because your app is compiled when using Live Reload, it works with all libraries and third-party controls. Live Reload works on all platforms Xamarin.Forms supports, including Android, iOS, and UWP, and works on all valid deployment targets, including simulators, emulators, and physical devices.

    I've installed LiveReload and included the below code in my MainPage.xaml.cs file of the .NET Shared Project.

    #if DEBUG 
        LiveReload.Init();
    #endif
    

    But LiveReload isn't running? Have I done something wrong? How do I run it?

  • DavidH_1997DavidH_1997 Member ✭✭

    @JGoldberger when I deploy or build the project, it's opening in the built-in Android emulator, which has never worked for me for some reason, so I'm not sure how to run the Live Reloader? It says at the top it's connected to localhost: and a port number, but I can't actually see it or work out how to run it

Sign In or Register to comment.