Xamarin initial setup not working because of Hyper-V issues [duplicate] - c#

I am using windows 10 home and visual studio 2017. I want to develop android apps with xamarin. Hyper-V feature is not available on windows 10 home and I can not afford pro version, So emulator is not installing without hyper-v.
What should I do to develop android app?
Have anybody idea to deploy android app without using emulator and hyper-v?
Thank you in advance!

It's possible to develop Xamarin app without using the emulators. But in that case you'll need to have an Android device to deploy your app on.
Setup Android SDK Manager on your system. Although Xamarin includes a
SDK Manager, you can download it from the following link. Android SDK Manager download
Setup the ADB (Android Debug Bridge) on your system (install Google USB Drivers)
Connect your Android device to the system after you enable USB Debugging(Developer options) on it. Once the device is connected it will give you a prompt to enable debugging. Tap yes and you'll see the option to build to your device as shown in image.

You can try to use any avaliable on windows android emulator. I like to use Bluestack (https://www.bluestacks.com), the steps for use it below:
Install Bluestacks emulator
Launch emulator and wait for load finished
It's your wellcome screen, your application and apps from store will be here
Go to settings > Preferences and check "Enable android debug bridge (ADB)" + "Enable Android input debugging"
One time Setup finished
"Open android adb command promt" and type
adb connect 127.0.0.1:5555
If you have done everything good you will be connected to emulator and ready to debug your application
Good luck!

UPDATE:
As of visual studio 2019, non-hyper v emulation has been stopped.
Old Answer
I am very positive that at the time of VS installation the Visual studio emulators for Android are readily available for download and use, there you can find a good amount of android emulators also it provides you with Android SDK which again can be used to create Android emulators without using Hyper-V
The below link contains all you need to know about Visual studio emulators including on how to install :
https://msdn.microsoft.com/en-us/library/mt228279.aspx
Hope this Answers your question.
Goodluck!

Related

How to force Visual Studio to use specific Android Emulator?

I have a question about Android Emulator(s) (well, there are actually three sub questions). So, In VS2015 we have two Emulators installed:
On the left - built in Visual Studio Android Emulator (made by Microsoft), using Hyper-V (please correct me if I'm wrong)
On the right - built in.. Xamarin.Studio? Android Emulator (made by Android), using HAXM (please correct me if I'm wrong).
I have a problem, because when you create a Xamarin.Forms project you get this Virtual Device setup by default:
It uses API19, but when I click "Run", it's complies without errors and deploy/run in new Android Emulator (on the right). Why?
When I open Android Virtual Device Manager, selects the same virtual device and click "Starts", it opens the Android Emulator (on the left). Why?
I've enabled Hyper-V for now, my Windows emulators work.
How can I force Visual Studio to run on old "on the left" Android Emulator when I run the project? Can I set this up?
When you open your Android Emulator Manager you will find the following choice
x86 means AVD with HAXM. If you do not have that choice please install image with HAXM
The emulator that create by android emulator manager is Google's default emulators, and Your left side emulator that means the Google's default emulators and with the skin like "WQVAG" or someting others.
Your right side emulator that is created by vistual studio:
when you find the the CPU Architecture is x86 that means it works with HAXM
Use the different AVD Name will clearify which emulator you selected to run.
How can I force Visual Studio to run on old "on the left" Android Emulator when I run the project? Can I set this up?
Select the emulator that create by android emulator manager with the skin.
On the left is an AVD thus it is Google's default emulators. It could be HAXM accelerated if you installed HAXM.
On the right is the VS Emulator for Android created by the Visual Studio team.
You are confusing the built in AVD emulators with the VS Android emulator.
By default whichever Device is selected (Has the green play button next to it) will be used. In your case, you have the VS Emulator for Android selected and thus it will always deploy to that one.
You can use the small down arrow to select another compatible emulator such as the Google emulators if you created a new AVD that is compatible with your project.
See further: https://developer.xamarin.com/guides/android/deployment,_testing,_and_metrics/debug-on-emulator/android-sdk-emulator/

Error while debug/deploy a Xamarin Windows Phone app on the device

I am starting develop on Xamarin.Forms Platform: I have installed it as Visual Studio's plugin. When i try to create a simple default project and then deploy it on the device (attached via USB) I obtain this message:
DEP4503: It has been installed the maximum number of app development.
These apps are installed on the device when I started in
Visual Studio or when using the deployment tool app.
Uninstall one of the app and try again. 0x-2130509543: Exception from
HRESULT: 0x81030119 HelloXamarin.WinPhone
But, I have not installed any app before! Is it 0 maximun number?!
P.S. I have a regular Developer Account. The device is unlocked for Developer Mode.
Thanks,
Regards!

Xamarin Visual Studio IOS Development Without a Mac?

I'm a .NET developer and want to write an IOS & Android app in C#. I've had a read around Xamarin for Visual Studio which looks interesting if not a tad expensive!
Do you need a Mac to debug your code? Do you just need a networked Mac to actually deploy the app to the Store?
Is the best option just to buy a Mac and run Windows with VS in a VM or can I just use my windows machine, write & debug the code in Windows then just hook up to a networked Mac for final deployment?
From May 2017, you can develop app without MAC.
Microsoft Xamarin introduce a Live Player. With Live Player, iOS apps can be deployed directly onto an iPhone or other iDevice from a PC running Visual Studio, where the code can then be tested and debugged.
WARNING The Xamarin Live Player Preview has ended. But it changed Hot Reload. With this feature, you can develop iOS app with your iPhone See discussion
See this video: https://www.youtube.com/watch?v=awgZDL1a3YI
this is Live Player Get start section: Live Player
Note: The final build and submission to the App Store will still require a Mac
Device Requirements
The Xamarin Live Player app supports the following devices:
iOS
iOS 9.0 or later.
ARM64 processor.
Check the App Store for a list of supported devices.
Android
Android 4.2 or later.
ARM-v7a, ARM-v8a, ARM64-v8a, x86, or x86_64 processor.
Limitations
There are some limitations on the things Xamarin Live Player can run, including the items below:
Android user interfaces designed with AXML files are not currently supported.
Some iOS storyboard features are not supported.
iOS XIB files are not supported.
Custom Renderers are not supported.
Xamarin.Forms Effects are not supported.
Embedded resources are not supported (ie. embedding images or other resources in a PCL).
Limited support for reflection (currently affects some popular NuGets, like SQLite and Json.NET). Other NuGets are still supported.
Some system classes cannot be overridden (for example, you cannot implement a subclass).
Some platform features that require provisioning can't work in the Xamarin Live Player app (however it has been configured for common operations like camera access).
Custom targets and build steps are ignored. For example, tools like Fody cannot be incorporated.
Yes, you must have a Mac to do Xamarin.iOS development. The Mac is required for building as well as running the iOS simulator. You can either use it as a build server, and actually do your development in Visual Studio (either in a standalone PC, or on a VM running on your Mac), or you can do your development directly on the Mac using Xamarin Studio as your IDE.
You can use Xamarin Studio instead of Visual Studio and build iOS application by C#.
First install VMware Workstation and then download OS X image and run it by VMware.
Then Install tools on it and enjoy.
Tools :
EDIT : The following links are out dated, You must install Mac OS 10.10 in order to be able to install XCode 6.
iOS Tools that you need:
1) Mac OS X image for Windows
Note: Max OS X Installation Help:
http://www.sysprobs.com/easily-run-mac-os-x-10-8-mountain-lion-retail-on-pc-with-vmware-image
2) Mono:
http://download.xamarin.com/MonoFrameworkMDK/Macx86/MonoFramework-MDK-3.2.4.macos10.xamarin.x86.pkg
3) Xamarin Studio:
http://download.xamarin.com/studio/Mac/XamarinStudio-4.2.1-1.dmg
4) MonoTouch:
http://download.xamarin.com/MonoTouch/Mac/monotouch-7.0.4.209.pkg
5) Xcode
Update 2018
Install VirtualBox
https://www.virtualbox.org/
Install MacOs 10.13 on VirtualBox
https://techsviewer.com/install-macos-high-sierra-virtualbox-windows/
Create or login with an apple account on the mac
Install XCode 9.0
https://download.developer.apple.com/Developer_Tools/Xcode_9/Xcode_9.xip
Enable Remote Login
System Preferences > Sharing > Remote Login > Enable for All Users
Configure VirtualBox with an additional network adaptor (host-only)
In Windows > Visual Studio (Xamarin Project) > Pair with mac
Enter the IPaddress of the second network adaptor
Let Visual studio install Xamarin IOS, IOS SDK, additional tools on the Mac
All set up.
An option is to use a remote service to do this.
For example:
http://www.macincloud.com
Anybody know that a Virtual-Machine is the solution! but when you want to have an OSX on windows it's not really easy as you just talked about it.
it's very important to find best OS ROM.
check it out here.
and you have to know that limitation is Apple's doing, not Xamarin's.
As someone that developed 3 Xamarin Forms apps, I would like to bring some points about the options:
Pair with a virtual Mac (VMWare, VirtualBox or cloud)
I worked this way for a while, but virtual machines consume a lot of hardware resources. Paid for a month to use a remote Mac, but the pairing and debugging process does not get much better.
Develop inside a virtual macOS
I have been using this option with good results. I just run everything on the macOS VMware virtual machine. Visual Studio and Emulator got a little slow (my CPU is i5 and 8GB ram), but is acceptable to make some adjusts. Advantages: Avoid pairing, Xcode to edit some resources, publishing.
Install macOS on Windows PC
This is kind of upgraded of previous suggestion. Didn't tested yet, but the performance should be better than VMWare if it works. They call this Hackintosh and is possible if your hardware is compatible.

How do I debug on a real Android device using Xamarin for Visual Studio?

I've found a few links but they don't explain how this is done. I can debug using Xamarin Studio IDE but that IDE (no offense) is lame compared to Visual Studio 2012.
Using Visual Studio 2012, there appears to only be option to select an emulator to debug. So how do I get it to debug on my real device via USB (I already have USB Debugging = true)?
I'm using Visual Studio 2017 with a OnePlus.
In order get debugging working I did the following.
Go to Settings > About phone and tap Build Number repeatedly until developer mode is enabled
Go into Settings > Developer options and turn USB debugging ON
Connect you phone to your PC via USB. I had to plug my phone into my PC's onboard USB port, not my USB hub as this did not work
You should be prompted to trust your PC (trust it)
Fire up Visual Studio
Open your solution and your device should now be available.
Side note: I have noticed that sometimes it also depends on the cable you use. If you still have no luck, perhaps try another cable.
You will get a confirmation prompt on the android device to ask if the PC is allowed to connect. It's easy to miss this if your device's screen has gone to sleep.
I'm using Visual Studio 2015 with Xamarin and the only way I can get it to recognize my Galaxy S4 is to turn USB debugging off and back on again while VS is running. This is required everytime I wish to use this phone with VS. I've never had to do this with Android Studio.
1 - Original drivers (Example: http://androidmtk.com/download-samsung-usb-drivers)
2 - Enable Developer's Options on mobile (for example on android 4.2.2, perform 7 click on "mobile info" - "serial number")
3 - USB debugging on your Mobile Developer's Options too
I also experienced a similar issue,
I solved it by installing the USB drivers specific to my phone model.
tl;dr Install drivers if you haven't already done so.
As mentioned in one of the comments above I installed the device specific USB driver (LG drivers are here) and it solved my problem. It now works perfectly.
I was under the (incorrect!) impression I wouldn't need to install the drivers to enable debugging. I could already connect my device to my laptop to view files etc. and hence thought drivers were unnecessary.
Once everything else is ready, the device could appear under the "Not compatible devices" list. This could be happening if the "Minimun Android version" set in your project is higher than android version you have in your device. If so, you can set the "Minimun Android version" in the android manifest
I set my Mobile connection in USB charging mode and enable USB debugging. It may ask for driver installation, after driver installation disconnect the mobile and reconnect it, now this should show in Visual studio device list for debugging.
It looks like Xamarin Android Player is not installed. You will need to install this.

How to develop iOS app using Xamarin Studio on Windows?

I'm evaluating a Xamarin Studio indie license which does not include VS integration - Correct me if I am wrong. But I want to know if it's possible to use Xamarin Studio to do iOS development? I'm very interested in the new feature of iOS designer announced at Xamarin Evolve, ideally it shall be possible too on Windows.
If the answer is yes, how?
Currently it is not possible to develop for iOS using Xamarin Studio on Windows.
If you want to use Windows, you can use Visual Studio.
If you want to use Xamarin Studio, you can do so on a Mac.
Note that you will always need a Mac around, even if you're using Visual Studio.
While not specifically answering the question, it should be noted that it is possible to develop for iOS in Visual Studios using a connected Mac as a build host. This connected Mac could either be through the network or can even be a VM running from your Windows machine.
We can use xamarin studio in Mac OS only. If you want to use xamarin in windows you need to download xamarin plug in to visual studio from xamarin.com. Also you must need Mac Os as virtually running on windows for debugging and seeing output. User interface design should only performs on Mac OS Xcode SDK. So only we need Mac OS virtual machine on windows. In visual Studio IOS project file having .xib file (i.e) Xcode Interface builder, in that file only we need to design user interface configurations using xcode on Mac OS.
Using Mac build Host you can do but you'll need the networked mac for developing and debugging too.
or else you can use Xamarin Live Player using which you can debug,develop and deploy the app completely in windows without the help of any Apple system but to sign and release the app to appstore you will need Apple System though
You can code your whole iOS application of from Visual Studio in windows.
When it comes to execution of application, you have to have MAC machine. You can connect your MAC to windows on Network by Mac build Host in order to run, debug your application in windows.
For more information follow this link.
Currently it is not possible to run Apple iOS emulator on windows.
See the official documentation given on url Installing Xamarin.iOS on Windows in Xamarin Developer Documentation which says :-
There are some tasks that Xamarion.iOS for Visual Studio currently cannot do i.e
No iOS simulator on Windows – The iOS Simulator runs on Mac OS X, so
it’s necessary to switch to the Mac’s screen when testing on the
simulator
http://docs.xamarin.com/guides/ios/getting_started/introduction_to_xamarin_ios_for_visual_studio/ says
Xamarin iOS for Visual Studio allows iOS applications to be written and tested on Windows computers, with a networked Mac providing the build and deployment service.
So I think you can do developing and testing (debugging?) but not building nor deploying. CMIIW.

Categories