VS2017 Deploy to ARM - c#

I can usually find resolutions to my problems here, but no one seems to have experienced the problem I'm having.
I'm using VS2017, building a UWP app for Win10 Anniversary edition. The app deploys fine to the Local Machine and the emulator. However, when I try to start debugging on the phone (MS Lumia 950), the Deploy process finishes successfully almost instantly. Then I get the "Project needs to be deployed before it can be started..." message. I'm not seeing any error messages during deployment, just the one after deployment apparently succeeds. If I try to deploy from the Build menu, I get the same rapid deployment.
The phone and PC both are updated with the Creators update. I have rebooted the pc and the phone. I have checked the 'Deploy' option in Config Manager. The phone is unlocked when I deploy. If I unplug the USB cable, I get the expected "Bootstrapping failed. Device cannot be found." message. I don't have another USB-C cable to try, but I can see and explore the phone from File Explorer in Win10. I used "WinAppDeployCmd List -ip 127.0.0.1" to make sure the app really isn't on the phone.
I've developed some other UWP apps in VS2015, this is my first go with 2017. Sorry if I was overly verbose, I want to provide as much detail as I can. I don't know what to try next.
Thanks for any insight.
Don

Related

Unity & Unity Remote 5 Android cannot USB test

I started a project on Unity and I would like to test it on an Android device, but I am unable to do so. I researched every tutorial out there and couldn't find a solution that worked for me. Note: I have been using Android Studio and I am able to launch apps both through an emulator and a USB phone.
I am pretty sure I correctly chose all the settings inside of Unity
(followed every single tutorial I could find).
Turned on developer mode on phone and tried multiple setting
variations that I could find on the web.
Made sure all the drivers are installed correctly (wouldn't be able
to do stuff through Android Studio if I haven't).
Uninstalled Unity and Unity Remote 5 multiple times.
JDK and NDK seem to be working fine. Tried turning adb server on and
off multiple times. Also I can see my device with the 'adb devices'
command.
I had some issues with MalwareBytes when installing Unity. I did try
granting permissions to every Unity folder I could find, but I think
MalwareBytes could be the culprit.
Has anyone encountered a similar issue? Is there another thing I could try? Any help is apreciated.
EDIT: I switched my VPN to a VPN that allows open source software and I also uninstalled Malwarebytes and replaced it with Avira. Did not fix the issue.
I did not run in exact same issue, but working with Unity remote might be a little tricky.
It may require to launch Unity remote first before launching Unity itself. And I hope did not forget to ProjectSettings -> Editor -> Any Android Device option to be set. I'm talking about Window OS.
I had the same issue today. I also did everything was mentioned in tutorials and nothing helped.
Then I noticed that when I press 'Play' there's a message in the console "Set-up Android SDK path to make Android remote work in Unity". After I went to 'Edit'->'Preferencies' I unchecked the 'Android SDK Tools Installed with Unity(recommended)', then closed Unity, opened it again and checked the box again.
It worked for me, I hope it will help you too :)
When you connect your phone to your PC, you may chose the file transfer option in your Android device, but charge mode worked for me, this is what I did:
1-Make sure that the "Any Android Device" option in Project Settings/Editor, is enabled and close unity.
2-Open the Unity remote app in the phone and connect it to the PC, in charge only mode.
3-Open Unity and run the game
This method worked for me, I hope it works for you too.

Unable to deploy Xamarin app on physical iOS device in JetBrains Rider

I decided that I want to work on my Xamarin apps in Rider, IDE from JetBrains. I tried to do that yesterday and the problem was, I can't for some reason deploy my app on physical iOS device (iPad 4). In Visual Studio 19 for Mac it works fine, so my provisioning is fine.
When I try to run app with iOS default config, it offers me various deployment targets, all of which are simulators. But if I go to edit the configuration, I can select connected device and then select my iPad. Though, when I go to run the app again, I am once more greeted with list of simulators.
Please, help me figure out what the issue is, brief googling did not help.
I fixed it by switching from Debug configuration to Debug|Iphone configuration, then it showed my ipad as deployment target. Hope it helps someone

Visual Studio "Pin is required to establish a connection"

I'm getting a weird error from Visual Studio after a fresh install on a clean system.
Today my computer was getting groggy so I decided to reinstall the computer (Win10) this is exactly what I did
1) Backed up using a batch program I wrote which compresses the dragged on directory using 7zip and renames it "folders name( dd/mm # hh:mm)", creates 2 txt files with data for ftp commands, opens an ftp connection to my webserver, uploads the zip, then uploads to same zip to my nas and then to my sd card, the batch deletes the zip from temp and the text files, everything said it performed normally.
2) I went to reset my pc and reset everything and deleted all files
3) After Reinstalling I downloaded 7zip and visual studio with all the addons in the tick box list at the beginning of the installation, except I noticed it has windows phone 10 emulators this time.
4) unzipped my work from the SDHC
5) Opened in VS, VS asked me to login so I did everything loaded in normally
6) Plugged In my phone (Lumia 930 WP10) clicked start debugging
and I got this popup
A PIN is required to establish a connection with the remote device. Please enter the PIN to pair the Device
I have never seen this error, and as far as I can tell no one else has, that's why I have written in detail what I did to get it, the only post I can find says it is in the debugging properties so to set it to no authorisation but that is for a raspberry pi using VS and that option is not there or anywhere within VS
the phone does not have a pin, or can I find a single setting anywhere on the phone or VS.
I did however come across a setting in the phone that allows you to connect to your phone in the browser on a computer via its ip and remotely control the phone and access all the data via the browser
The Error I Get in VS
The Phone Remote from a browser (If anyone is curious)
UPDATE*** no matter what I do, I CAN run any of the windows phone 10 emulators, but VS CANNOT detect any emulators other than 8.1 emulators
Same problem, then I found this answer:
https://stackoverflow.com/a/33667162
The solution is really helpful for me.
Simply, you can do this from an admin command prompt:
reg add HKLM\SYSTEM\CurrentControlSet\Control\SirepClient /v DisableProtocol3 /t REG_DWORD /d 1
PROBLEM SOLVED**
I went to programs & features, clicked visual studio community edition, and clicked repair, after it finished it said there was a problem installing the windows 10 SDK (v XX.XX.XX), so I went to
https://dev.windows.com/en-US/downloads/windows-10-sdk
I noticed the version number on the website to be higher, so I installed the SDK manually using the download link and presto it works :)
I had this issue when running Visual Studio in a virtual machine under both VM Ware Workstation 12 on a windows host, and VMWare Fusion 8 on a MAC host.
The solution was to edit the virtual machine settings and change the USB Compatibility settings from version 3.0 to 2.0.
I made it work with the following steps:
Turn the developer mode off on the phone and switch to "Only install Apps from Store"
Unplug the phone's USB connection
Restart the phone
Restart your PC
Start Visual Studio
Connect the phone to your USB port
Try to debug the app on your phone, if Visual Studio does say anything else than "You have to put the phone into Sideload mode" (or simular), start over with step 1.
Put the phone into sideload mode (not developer mode) and try again to debug, now the same message should show up like in step 7.
Switch your phone into developer mode
Now the deploying process should work without any trouble. If not try the steps (maybe with some variations) again. I don't know where the problem is, but the above steps worked for me. I don't know whether all steps are necessary, report back if you can leave one out. This solution doesn't helps permanently, sometimes the problem comes up again. I think don't unplug the phone while debugging, helps to let the problem occur less often.
You simply need to swipe your phone to unlock it (also enter pin if any). Since the phone is locked you cannot deploy any app on it.

VS 2015 intern Android Emulator not starting (vmWare 10)

I am running VS2015 CTP6 on a freshly installed and updated Windows 8.1 N x64 VM.
Hyper-V support is enabled, hypervisor.cpuid.v0 = "FALSE"and vhv.enable = "TRUE" are set to vmx-file.
When i try to run the build with a Visual Studio Emulator for Android-device VS will tell me "starting emulator" forever. No error, no window, nothing at all.
The included AVDs (like AVD_GalaxyNexus_ToolsForApacheCordova) start fine, just the new Microsoft VS Emulator for Android isn't working.
After canceling the building-process a message pops up: "Could not start emulated device 'VS Emulator....'" which will now always pop up instantly (after building) if i hit F5. So after canceling the build once VS won't even try to start the emulator again (on that project with that specific emulation-device).
In hyper-v-manager there are no computers at all. \Microsoft Visual Studio Emulator for Android\1.0\ does not contain a XDE.exe but 2 vsemu.vhd's.
I also followed this guide and tried to start the emulator as a standalone.
"pathto\XDE.exe" -vhd "pathto\vsemu.api19.vhd" which will actually start it up and displays "loading" on the emu screen but will crash because i haven't installed the Windows Phone support in VS.
The Visual Studio Emulator for Android can't be run nested inside another VM, particularly not a Hyper-V VM, because the emulator itself is a Hyper-V VM (and Hyper-V doesn't support nested VMs). See the last bullet in "Current limitations" at the end of this blog post.
My emulators disappeared (according to VS) after CTP6 update although all the images, SDKs etc. are still there.
I sorted it with a repair (control panel, programs, vs => modify.) It took many hours do just let it run.
Double check that the VM you are running on has enough memory(emulator will use a lot- and run Procmon to see what VS does and where it fails. Check event log and turn on logging for the VS instance you are using to look for cues.
"The Visual Studio Emulator for Android can't be run nested inside another VM"- is incorrect. My Windows10 VM is happily serving up the emulator for the different platforms and the same goes for Windows 8.1 & 8.
HyperV doesn't seem to be able to support quite yet (AFAIK) but there are other hypervisors you can use such as VMWare player- and from your config edits in the VM I assume you already knew that :)
I'll provide picture proof later (phone only right now so I'll have to edit typos as well later).
Tweaking Virtual Maschine Settings did the trick for me. I was also trying to run the Android emulator by starting a debug session in VS2015 Community for a Xamarin project. VS2015 was running inside a Windows10 VM based on VMware Workstation 12 Pro hosted by Windows7 on a i7 CPU. I ran into the following error message:
"... The Virtual Machine Management Service failed to start the virtual machine 'VS Emulator 5-inch KitKat (4.4) XXHDPI Phone.andreas' because one of the Hyper-V components is not running (Virtual machine ID ...)."
Everything worked fine after activating the following flags in the virtual machine's processor settings section:
Virtualize Intel VT-x/EPT or AMD-V/RVI
Virtualize CPU performance counters
(Preferred mode: Automatic)

Debug Application with MonoDroid Trial Version

I have installad MonoDroid Trial Version.
I have create an "Hello Wolrld" application and debug it in the emulator
but any application appears in the list of application on Android Device Emulator!
The problem is the trial version or some error in my application?
Can you help me please???
The Android emulator is somewhat tricky, at least with MonoDroid. Once you execute the application and have selected the virtual device you defined for Monodroid the emulator will launch. Here comes the tricky part, you'll also get a Monodroid "Select Device" window underneath with some slight differences to what you initially had. You should go to that windows and now choose, for example, "emulator-5554" in the running devices list and press "OK". Once you have done that the application should be deployed to the emulator. Slow but it should be deployed.
For increasing Android emulator performance I recommend you to have a look at Emulator snapshots and this article at MoreWally.com.
The bug is described in the following document:
http://support.xamarin.com/customer/portal/articles/141157-ide-does-not-display-target-device
The procedure I use when starting up is:
Close development environment, SDK manager and emulated devices.
Open AVD Manager and start the emulator(s) you would like to use.
Run the command 'adb devices' (located in Android\android-sdk\platform-tools) and note which devices are listed.
If there are none, or the list is incomplete, then run 'adb kill-server' followed by 'adb start-server'. You may wish to create a batch file with these commands.
Now check the devices are visible with the command 'adb devices'.
Open development environment and everything should work.
If you kill or start a new emulated device, when you have VS2010 open, and then devices do not appear as a 'running device' in VS2010, then close VS2010 and perform steps 4 through 6. When you reopen it should now work.

Categories