Does VS2017 support Edit & Continue in Xamarin forms? - xamarin.forms

I'm just starting out with Android development using Xamarin in Visual Studio 2017.
This question suggests that E&C isn't possible, but that was a couple of years ago.
Is it still not possible to put a breakpoint somewhere in, for instance, MainActivity.cs, and then edit the surrounding code when it hits the break?
I'm using an Android 6.0 emulator created using the Android Virtual Device manager.

This feature is not yet available in Visual Studio 2017 for platforms like Android and iOS however this works on UWP platform.
In this comment. Rodrigo Kumpera says:
We're constantly evaluating what's the best to do for our users. We
know how awesome it would be to have Edit and Continue - we really do.
That proves that this feature is not yet available.

Related

Xamarin Android app out of the box shows undefined Android.Support, Android.Views, Android.Content in MainActivity

I needed to rebuild my fairly ancient Xamarin Forms app from scratch and in the process arrived at a situation where I had a new working iOS app but had needed to delete the draft Android app and start it again. So as a next step I added a vanilla Android app project out of the box and immediately what I saw was that (in MainActivity) Android.Support, Android.Views and Android.Content were undefined with wiggy red lines beneath -- for example in a reference to Android.Support.V7.Widget.Toolbar.
Trying to solve the problem, I set each of Target Framework, Minimum Android Version and Target Android Version to Android 9.0 Pie (API Level 28). In SDK Manager I checked that Android SDK Location and Java SDK Location were 'Found' and that Android SDK Platform 28 was installed.
The following NuGets came installed along with the project, I deleted them and reinstalled them (removing bin/obj folders in between): Xamarin.Android.Support.Core.Utils, Xamarin.Android.Support.CustomTabs and Xamarin.Android.Support.Design.
I tried installing NuGets Xamarin.Android.Support.v7.*. And I added the Xamarin.Forms NuGet. I tried adding 'use' declarations.
None of this helped.
For comparison I separately installed a blank Android app solution-- it worked perfectly out of the box.
Android is pretty new to me - would be grateful for suggestions on fixing this.
The app has a .NET Standard 2.0 project, an iOS project, the (vanilla) Android project (all three with Xamarin Forms), and a .NET Standard 2.0 library project.
I'm using Visual Studio for Mac V8.5.4 (stable) on MacOS 10.15.3.
I noticed that the content of MainActivity.cs is quite different, depending whether the Android project is created separately or as part of a Xamarin Forms solution. Also the provided NuGets are different. So perhaps what I was trying to do, adding an Android app to an existing XF solution, is simply not allowed.
To fix the problem, I created an empty Xamarin Forms solution with Android and iOS projects, added a further empty library project, then in Finder replaced the content of all the project folders, except the Android one, with the content of the corresponding folders in my working solution (the one with a working iOS app).
Migrating to AndroidX is a good idea though.
I don't know if this will help, but you should migrate to AndroidX as soon as possible, nevertheless. Xamarin has migrated to them, starting from Forms 4.5
Here is some more information about the libraries - Introducing AndroidX for Xamarin
There is a special NuGet package for the migration - Xamarin.AndroidX.Migration. Also available is a built-in functionality in Visual Studio - here
What I can suggest is you try to migrate to AndroidX libraries, since the old support libraries won't be supported from now on, and you will surely encounter some issues if not like this one, then something else will pop-up in the future.

Can we build a Xamarin based android system application in visual studio or Android studio IDE?

I want build and debug a xamarin based "SYSTEM" android application in visual studio. Is it doable?
Yes it is doable, therefore you need this:
Xamarin.Android 7.5 or later
Android Studio 3.x with Java 1.8
More information how to set up the system you can find here.
Here is some basic information from MSDN that you can start with for distributing your Xamarin.Android app as a System app.
It's difficult to provide specifics on this topic because the way you go about doing this can shift dramatically depending on your setup. Even MSDN states that. The article provided though is a great starting point to begin to understand how to go about installing your app as a system app.

Xamarin Forms how to check it contains the latest Api for Android and iOS

Hi newbie on Xamarin Forms.
I am a bit of confuse on using Xamarin forms.
With the following questions, I hope you can help me to understand to use it for development.
Currently I am using VS2015 Community version
1) If I have done the Settings on Cross Platform development to include C#/.Net(Xamarin v4...), do I still need to download the Xamarin at Xamarin.com?
2) Understand Android and iOS have different Api level (Sdk ver) and iOS ver8,9,10 respectively.
So, When google releases new api or Apple releases new iOS ver, How do I update Xamarin to use them? what I need to and How I handle Android and iOS new update respectively? What are the steps to take?
3) If I have Updated Xamarin, is this means it has included all the latest Api for Android and iOS
4) Can I use Xamarin for VS2017 as compare to VS2015 is more matured?
Thanks
You can and should use latest and greatest tools available, unless you have some limitations. Use Visual Studio 2017, it provides an easy installation of Xamarin.
When a new version of platform SDK is released by Google or Apple for example, you will have to:
Download & install new platform SDK for Android / iOS
Update Xamarin.Forms nuget package in the project
Additionally in case of iOS you may need to update Xcode
Xamarin.Forms documentation can answer all of your questions, so I suggest to get familiar with it.
I think you'll need to add some steps.
First - try create Xamarin Forms project and buil it(for Android). If you have errors - please read this manual
You need to check the update in several places.
2.1. About the new version Xamarin you will be informed Visual Studio.
For VS 2015 Check next setting - Service - Parametrs - Update Xamarin(checked).
For VS 2017 - You'll see the checkbox on the top right.
2.2 About update Android Api -You must learn manually. Check in VS
Service - Android - Package manager SDK Android. The new AIPI is a great event in the world of android - but you need to sit behind the news.
2.3 Also packages(Xamarin Forms and other) are updated - you need check nuget packages for your solution.
2.4. You must manual run update Xamarin for your mac. This is an extensive topic. Please read this article.
No is it. You need some manual actions(see item 2).
VS 2017 Has new features and new bugs ). I use VS 2017.

Is it possible to set debug points for Java and Objective-C with Visual Studio Cordova?

I am trying to figure out a way to debug native Java and Objective-C code for a Cordova plugin, and I was wondering if it is possible to use Visual Studio Cordova to do this on my Mac. Ideally, I would like to hit these debug points at runtime. I have seen videos and other tutorials showing that it is possible to set debug points in JavaScript, which is helpful, but not what I'm trying to accomplish.
Unfortunately neither Java nor Objective-C debugging is supported by Visual Studio Tools for Apache Cordova today.
Cordova generates a native Android and iOS project under the hood (which I am guessing you know given you're doing plugin development). VS can be used to generate the underlying Android or iOS project, but you'll need to use native tools to debug Java or Objective-C. If you're using the "remotebuild" agent, you can find the generated Xcode projects under ~/.taco_home/remote-builds/taco-remote/builds.

Visual Studio 2015 missing emulators

I have VS2015 and VS2013 installed side-by-side. In VS2013 I have a list of emulators to start my app and it works awesome.
But VS2015 only has device in the list. How do I add the phone emulators to Visual Studio 2015?
UPDATE:
After playing around some more I've dug up some new findings.
Creating a new universal JavaScript project has the same issue
Creating a new universal C# project DOES show a list of emulators.
This worked for me!
Although I had CoreCon\12 and vs2015.3 instead of CoreCon\11 and vs2012
Maybe you could fix this issue by deleting this folder
C:\Users\\AppData\Local\Microsoft\Phone Tools\CoreCon\11.0
Then open VS2012 again.
If not repairing is always recommended
original post : no-emulator-lists-to-deploy-windows-phone-app
Rerun the installer. Make sure that the desired options are checked (probably either Windows Phone 8.1 Emulator or Microsoft Visual Studio Emulator for Android, you don't say which emulator you are interested in). If in doubt, just check everything.
If you had unloaded your start project, it may not be your start project anymore after reloading. So do a right click -> Set as Startup Project and then hopefully the emulators will reappear.

Resources