Visual Studio Emulator For Android - Hyper-V No Launch - visual-studio

Have been trying to launch the Visual Studio Emulator for Android for quite some time with the continued end result of an error code from the log of either [Critical] XDE Exit Code: 16, [Critical] XDE Exit Code: 3 or an infinite "Preparing Virtual Machine" status. I've tried numerous troubleshooting guides and different device profiles but haven't had any success, nor in reproducing what has worked for others.
Running Windows 8.1 Pro 64-bit
Things I have tried:
Both Repairing and Reinstalling the Program
Reinstalling Android Studio and SDK (along with the above in various orders)
Changing Administrative Permission through Microsoft Management Console
Running XdeCleanup.exe
Creating an internal switch in Hyper-V Manager (removing in between attempts)
All of the above by "Run as Administrator"
I have been able to create a virtual machine using the Internal Switch(s) I've created in Hyper-V Manager (albeit there is nothing to boot from) and can run Virtual Box successfully so I do not believe it is a question of my BIOS setup. I would greatly appreciate any insight you could offer or a possible solution that has worked for you with this emulator. Thanks for your help.
*Note that there is no instance of Visual Studio installed on this PC (the documentation suggests that it is not required).
Screens:

You need to be a member of the Hyper-V Administrators group. Go to Control Panel and then Local Users and Groups. Add your username to the "Hyper-V Administrators" group. If no group exists, create it.

Related

Why doesn't Visual Studio Emulator for Android launch anymore?

I'm using Visual Studio 2015 Enterprise with the new Android Emulator. It worked pretty well for a while but suddenly it stopped working.
The output in VS shows always this:
1>Starting emulator: VS Emulator 5.1" Lollipop (5.1.1) XXHDPI Phone
1>Validating emulator arguments...
1>Determining if emulator is already running...
1>Preparing virtual machine...
1>Launching emulator...
The emulator window appears but it stucks on the black "Loading..." screen. I see in the taskmanager that xde.exe is consuming between 25% and 32% of CPU power. There are no entries in the Windows eventlog telling anything about xde or Hyper-V.
I've already deleted all virtual computers in the Hyper-V-Manager as suggested by Microsoft on the Troubleshooting the Visual Studio Emulator for Android page.
Has anyone an idea how to get the emulator running again?
If you face the same problem then you can try to solve it by these steps:
1. Delete all virtual switches
Try it the way John Kemnetz told in his answer:
Go to Hyper-V Manager, and delete all virtual switches via the Virtual
Switch Manager 2) In Hyper-V Manager, delete all VMs. 3) Restart the
computer. 4) Start an emulator.
2. Disable network interfaces
If this doesn't work then try to do it the way Jason Smith described in a comment:
disable the network interfaces except the windows phone vswitch. Then
once the emulator is booted, turn it back on. If you delete them Xde
will recreate them, you want them created but disabled in the control
panel. The only thing to leave enabled is the windows phone one.
In case this doesn't work neither (which was my case) then
3. Reinstall Visual Studio 2015 Emulator for Android
Uninstall the emulator, reboot the PC and install it again. This worked for me. But I suggest to try the other two options first as the third option can be really time consuming.
Try this:
Go to Hyper-V Manager, and delete all virtual switches via the Virtual Switch Manager
In Hyper-V Manager, delete all VMs.
Restart the computer.
Start an emulator.
Windows 10 updates for some computers are causing problems with virtual switches and they need to be recreated by the emulator from scratch.

VisualStudio 2013 Express phone emulator - device not found

Step1: Installed VisualStudio 2013 Express for Windows along with
Update 2.
Step2: Created a blank Windows Phone App.
Step3: Deployed the app to the Emulator 8.1 WVGA 4 inch 512MB.
The Emulator Displays with the message 'Windows Phone is Starting'. Times out after about 5 minutes with the following error messages:
Error: DEP6100: The following unexpected error occurred during
bootstrapping stage 'Connection to the device':
Error: DEP6200: Bootstrapping 'Emulator 8.1 WVGA 4 inch 512MB' failed.
Device cannot be found. App deployment failed. Please try again.
Hyper-V Manager shows the phone emulator running when the app is deployed to the
Phone Emulator.
Running my existing phone 8.0 apps with VisualStudio 2012 Professonal through the
phone emulator stopped working after installing VisualStudio 2013 Express with Update 2.
I get this error:
Windows Phone Emulator is unable to connect to the Windows Phone
operating system:
The phone did not respond to the connect request.
Some functionality might be disabled.
Tried running as administrator and repairing VisualStudio 2013 Express with no effect of this problem.
Anyone having similar issues ?
I solved this problem just now. Please take all windows update. Reboot, and check again for any remaining update. This was a bug earlier as well so microsoft fixed it in first update of windows 8.1
Then check any remaining extension update for your visual studio 2013. update there as well.
Try opening a sample app, it should work.
Regards
Kajal
I had same problem . first i fixed it with:
Updating windows
Uninstall / install Windows Phone SDK 8
Remove and add Hyper-v again ( maybe it is not necessary )
But problem came back and instead of previous solution i fixed the issue with :
going to windows firewall and then click on "restore defaults"
Open Hyper-V manager. Look at all the emulators that are running and turn them all off.
Then open visual studio and deploy your app.
This will start a fresh instance of Emulator.
I had the same problem with VisualStudio 2013 Professional and the latest Windows Phone 8.1 SDK and emulators (as of December 2014).
In my case I fixed it by changing the virtual switch 'WinPhoneEmulatorSwitch' in Hyper-V Manager from 'Internal network' to 'Private network'.
I found this solution at pekari.wordpress.com
I had your same problem and after many attempts resolved it this way:
Deactivate Hyper-V (and restart computer);
Go in the Device Manager and open the Network Adapters, here uninstall everything with the name "Hyper-V...", this will allow us to reactivate Hyper-V without any conflict;
Enable Hyper-V (and restart computer);
Finally launch the emulator (if it is the first time you launch it you will have to wait 5-10 minutes, so be patient and wait for it to load all apps it need).

Can't debug correctly Windows drivers with Visual Studio

I've written a Windows driver sample (WDM) with Visual Studio but I'm encountering issues when trying to debug it. The target is running in a Virtual Machine (VMware)
I've followed the documentation (http://msdn.microsoft.com/en-us/library/windows/hardware/hh698272(v=vs.85).aspx) to configure everything.
It's compiling fine but there are problems when debugging.
I have tried various configurations and have different problems on each.
Visual Studio 2013 Preview on Win7 (host) / Win8.1 Preview (target) - VMware
It seems the debugger isn't working properly. Indeed it's like if nothing was loaded, the Modules Window is empty, when I click on "Break all" nothing is happening. As you can see in the logs, the debugger session isn't created.
Screenshot:
Logs: http://pastebin.com/DfVzGR4Z
Visual Studio 2012 on Win7 (host) / Win8 (target) - VMware
It's working correctly at the first try but if I stop the debugger to modify the driver, it'll freeze the VM. I'll then have to restart the VM, Visual Studio and kill the process ntkd.exe because otherwise I have these errors:
Failure to create process instance prevents debugging
Unable to start (null), Error 80004005. (Unspecified error)
Followed by a crash of VS (Event Name: CLR20r3)
I've tried with other samples downloaded from the MSDN but it's the same problem.
I've been stuck on these issues for weeks and I'm starting to desperate, so any help would be appreciate. I haven't tried WinDDK but since VS has everything needed, I don't see why I couldn't use it normally.
I recommend to forget using Visual Studio for driver development/debugging because, on my opinion, is not solid enough.
But targetting the debugging process, it is better to install VisualDDK and then launch vmmon/vmmon64.
In the installed application you will find a folder named "target" with an application named DDKLaunchMonitor.exe, install it in the virtual machine (it will create a boot menu option to activate kernel debugging)
When you want to debug your driver, launch vmmon, activate the option to launch windbg at vm startup, start your vm and when windows boots it will load windbg and attach to the vm.
The install your driver as desired and learn windbg.
I know this answer does not solve you problem with VS but using windbg directly is faster and better.
I was having a similar problem with: Visual Studio 2015 Community Edition, Windows 10 host, Windows 10 target, VirtualBox with host only network.
Provisioning and remote driver deployment worked, but the debugger would not connect.
Edit: In the last step of provisioning in VS2015 the Host IP can be selected. The manual method below is an alternative.
The manual setup guide for kernel mode debugging says to run the following:
bcdedit /debug on
bcdedit /dbgsettings net hostip:w.x.y.z port:n
Visual Studio automatically runs these during the provisioning process. Notice the hostip parameter - this has to be the address of the connecting machine (the one with the debugger) on the interface it uses to connect to the target. Visual Studio may set this incorrectly if you have multiple network interfaces. In my case the VirtualBox host only network created the extra network interface.
Provision the target machine in VS, if you haven't already. Then run the two bcdedit commands above and reboot the target machine. After this, the debugger should connect properly.
I came across the same problem. The windbg connection is hang. I found there is something wrong in my configuration for Kernel mode debugger settings( Visual studio 2012 Driver->test->Configuration). I set the port simply com1. Actually, it should be \.\pipe\com_1.Then it works
In your case, there maybe other configuration problems. You can check through the points on webpage http://www.codeproject.com/Tips/545835/Kernel-Mode-Debugging-in-a-VM-using-Visual-Studio.

Windows 8.1 + Visual Studio Simulator + Wifi = Crashing

The issue I am hitting affects both the Visual Studio 2012 & Visual Studio 2013 Windows Simulators since upgrading to Windows 8.1.
When I try launch it (in either in Visual Studio or externally by launching the exe) I get the following error message: Client policy does not allow credential delegation to target server
The odd part is that is only occurs on my work wireless and if if I disconnect the wireless, then it works fine. It does not occur on my home wireless.
I found a similar issue with VPN's but I don't have any VPN's setup & the machine is not domain joined so I do not suspect an actual group policy.
Any ideas on what the cause for this could be?
There are a few credentials that prevent the Windows Simulator from starting on Windows 8.1. Run "control keymgr.dll" to open the windows credentials manager, then view the Windows Credentials. If you have any of the following you will need to remove them:
"",
"termsrv/",
"localhost",
"termsrv/localhost",
"*session"
In the RTM build of VS 2013 there should be a more helpful error message in this scenario.

Remote debugging in visual studio: remote debugger does not support this edition of windows

I am trying to remote debug my application in VMware workstation 7 and Visual studio 2010 ultimate. I habe several images (win 7 ultimate,vista,etc).
I am following this tutorial: http://kristofmattei.be/2010/01/20/debugging-applications-in-virtual-machines-with-vmware-workstation-7-and-visual-studio-2008-sp1-2/
Whenever I try to start msvsmon.exe on the remote computer it will say :
"The visual studio remote debugger does not support this edition of windows"
tried it with win 7 ultimate, vista premium and xp home, same situation.
Could someone help me out here?
Thanks!
The error message "The visual studio remote debugger does not support this edition of windows" appears because the remote debugger tries to use Windows Authentication by default, and this is only supported in the "Pro" versions of Windows, and up.
However, the remote debugger does work with the "Home" versions of Windows, you just have to tell it not to use authentication via the command line.
(Why it doesn't let you do this after launching it without any arguments, why the error message is so misleading (and contradicts the official list of supported OS), and why there is so little info about this on the web, I don't know. :))
To launch it, run this:
msvsmon.exe /noauth /nosecuritywarn
Of course, this launches it in the lowest security mode, so you'd only want to do this on a secure network. (But that's usually the mode one ends up using msvcmon in anyway, as the other mode is an even bigger PITA to set up than it is normally. Very useful tool, but really could use some streamlining.)
No need to use VMWare features.
Inside the guest VM run the version of msvsmon that came with your copy of visual studio 2010 (A setup package for just the remote deubgging stuff can be found on the disc/image) (use x86 if debugging a 32-bit process or x64 if debugging 64-bit one ,Itanium if you need to laugh).
through the msvsmon GUI disable authentication and select allow any user to connect.
disable the firewall in the VM.
on the host machine you should be running visual studio 2010, under the debug dropdown select "attach to process..." and then on the window that pops up select remote from the dropdown that should say local or something initially, enter the IP address (should be private network IP i.e. 10.1.?.?) of the guest VM, alternatively use the server name displayed by the msvsmon GUI. You should get the process list for the guest and should only attach to any process that matches the version of msvsmon you ran (x86 or 64 ...or Itanium laugh).
NOTE: These are basic instructions to show you it definitely works but these instructions will only work for native code since managed requires a secure connection.
If you are debugging a .NET app using the VMWare VS Plugin and are getting a "file not found" type of error...make sure you have the .NET runtime installed! :)
Like a moron, I set up a fresh XP VM and forgot to install the .NET runtime and wasted a good day trying to get the VMWare VS Plug-In to work!
VSID is not supported by visual studio2010 http://communities.vmware.com/thread/282407

Resources