After upgrading to Windows 8.1, unable to run Windows Phone emulator without memory error - windows-phone-8

After I updated my Samsung Series 9 SSD laptop with 8GB of RAM to Windows 8.1, (not even a year old, and top-of-line when purchased last november), I am now unable to run the Windows Phone emulator while debugging my WP8 app.
The error messages I see is:
"Not enough memory in the system to start the virtual machine emulator
WVGA 512MB.user with ram size 512 megabytes"
Well, the instant I attempt to run a build, it the machine immediately goes from 25% memory consumed to 80% consumed. Even after I close Visual Studio Express 2012, still it is stuck at 80% memory consumption according to the task manager. At this point, I am unable to run the Windows Phone emulator to test my app.
How can I work around this issue without replacing my hardware?
Thanks!

Microsoft has now posted a KB article with information about how to edit the registry to correct this:
Start Registry Editor.
Locate the following registry subkey:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows
NT\CurrentVersion\Virtualization
Right-click the Virtualization
folder, point to New, and then click DWORD Value.
Type MemoryReserve, and then press Enter.
Double-click MemoryReserve,
enter 2048 in the Value data box, select the Decimal option, and
then click OK.
Close Registry Editor.

I can't post comments yet but I wanted to confirm being able to start the emulator after starting the Hyper-V Manager. I was getting memory errors trying to launch the emulator; I started the emulator via the Hyper-V Manager and was able to launch it from VS2013.

Closing down some applications (eg SQL Server) did the trick for me.

Related

Windows Phone emulator not starting (couldn`t setup the UDP port)

After updating Windows 10 to build 10061 windows phone emulators (all 8.1 and 10) stopped starting. I get the following error:
"Windows Phone Emulator is unable to connect to the Windows Phone operating system. Couldn`t setup the UDP port"
I tried "reparing" emulators, but nothing changed.
Hyper-V manager shows that virtual machine works, and it can be started directly from Hyper-V manager.
As i said, in previous windows 10 TP builds it was OK.
The solutions above did not work for me. I found out that the issue was with the Hyper v adapters so I decided to deleted them which caused hyper -v to create them again.
These are the steps
Run cmd as admin and enter the following commands
set devmgr_show_nonpresent_devices=1
start devmgmt.msc
This will startup the device manager and show the list of hyper v network adapters
Right click and uninstall all hyper v network adapters
Open Hyper v manager and delete the virtual machines
From Virtual Switch Manager (right side of hyper-v manager), delete all internal switches
Restart the system and run visual studio and launch emulator
See this for more info http://www.gfi.com/blog/how-to-remove-hidden-network-adapters-from-virtual-machines/
Do you see your "Virtual Switch" information under: Control Panel\Network and Internet\Network Connections? If not, you can try to recreate your "Windows Phone Emulator Internal Switch" again from Hyper-V to see if that resolves your issue. Try these steps below:
1.) Open Hyper-V
2.) Shutdown any existing configured Phone emulators.
3.) Click on "Virtual Switch Manager"
4.) Click on the "Windows Phone Emulator Internal Switch"
5.) Remember what the settings are displayed there (because you will delete it and recreate it)
6.) Delete the existing "Windows Phone Emulator Internal Switch" by clicking "Remove"
7.) Click "Apply" and "OK"
8.) Re-create the "Windows Phone Emulator Internal Switch" by clicking the "New virtual network switch" and use the same settings you remembered in Step 5.
9.) Then try to F5 from Visual Studio - which should configure a new emulator on the right virtual switch.
I had similar problem, i tried the various solutions offered (cleaning up the Hyper-V images and network switches), reinstalling Hyper-V, reinstalling Visual Studio, restoring to Old System Restore point - but none of my actions didn't resolved the problem.
But i tried below action which fixed the problem, off course some might able to resolve the problem with above steps and other answers provided.
In my case, my virtual adapter doesn't have network connectivity. I shared my wi-fi adapter connectivity to virtual adapter. This fixed for me, i can able to deploy apps into emulator without any crashes.
For me, the following steps worked:
Open Hyper-V manager and delete all emulators
From Virtual Switch Manager (right side of hyper-v manager), delete all internal switches
From Control Panel->Network and Sharing Center, disable the virtual ethernet port for windows phone emulator
Start Visual Studio and start emulator from there (Just deploy a project)
Update: Your old connection will stay disabled and a new connection will be created. If you want to delete the old connection, go to device manager, find the connection and choose "uninstall"
In my case there was a problem with my notebook modem. It is a Sierra Wireless EM7345 4G LTE. As soon as I deactived it the Win10 Mobile Emulator worked like a charm.
For me all above solutions didn't work.
Maybe because my Ethernet is disabled.
My solution is similar to other:
1) delete vm's from hyper-v
2) delete all internal switches
3) create manually new switch and select wifi
screenshot
4) install vm profile
5) start it :)...
after 6h endly
If for some reason you are unable to delete internal switches in Hyper-V UI:
go to regedit
HKLM\SYSTEM\CurrentControlSet\Services\vmsmp\Parameters\SwitchList
delete Windows Phone entry (or all)
reboot computer
start VS and run emulator which will set everything up
I had a similar problem and tried many solutions and got the emulator working by doing the below steps:
Remove all the virtual switches from "Virtual Switch manager"
Restart your system.
Goto Control Panel -> Network and Internet -> Network and Sharing Center -> Advanced sharing settings
Advance sharing screen
And enable "Turn on Network discovery" and "Turn on file and printer sharing" for all network profiles.
Start emulator.
Done.
The steps suggested by Magani Felix above worked for me, but I had to apply two additional steps:
After deleting virtual switches from devmgmt.msc, the remaining virtual switch entry can't be removed from hyper-v manager anymore (step 5). However, just leaving it there was ok.
The first time I started the emulator from Visual Studio it could not connect. When I looked at the virtual switch in hyper-v manager, it had been created as a private virtual network. Shutting down the emulator from both Visual Studio and hyper-v manager, and then changing the internal switch to internal virtual network solved the issue. Afterwards, the emulator would start from Visual Studio and connect.
Windows 10 pro.
After attempting all the above, and similar suggestions from other threads, what ultimately worked for me was to:
Uninstall Hyper-V: Add/Remove -> Turn Windows Features On / Off
Uninstall Visual Studio Emulator for Android
Reboot
In Device Manager, "Uninstall" all remaining "Hyper-V Virtual Ethernet Adapter" instances found under "Network Adapters" node
Reboot
Reinstall Hyper-V
Reboot
Reinstall Visual Studio Emulator for Android
Download a device profile and launch
profit
Not all the reboots may have been necessary, but I had been banging my head against this for too long.
I believe this was caused due to me adding and removing Hyper-V a few times in the past, and some VirtualBox conflicts (which I currently do not have installed, it hasn't played nice with Hyper-V for me in the past).
Thanks for all tips above, hope this helps someone.
The solution offered by Silmar worked for me. All-in-all it appears that at least for Windows 10 Pro that one should install Hyper-V but not configure any virtual switches as the emulator installer will configure things properly.
Try this OPTION
1.) Open Hyper-V
2.) Shutdown any existing configured Windows Phone emulators.
3.) Delete the existing Phone emulators you see in the list
3.) Click on “Virtual Switch Manager”
4.) Click on the “Windows Phone Emulator Internal Switch”
5.) Delete the existing “Windows Phone Emulator Internal Switch” by clicking “Remove”
6.) Click “Apply” and “OK”
This should work.
If this does not, then do this:
Now, open “Network Connections”
You will see there “vEthernet (Internal Ethernet Port Windows Phone Emulator Internal Switch)”
But hey, you deleted this same switch in OPTION 1, but still it shows in the Network Connections page.
Now open Device Manager, Expand “Network Adapters”
You will see the names appearing under Network Adapter match the same as “Device Name” mentioned in “Network Connections” window
Find out the correct “Hyper-V Virtual Ethernet Adapter” to be removed.
Now, in Device Manager, right click the correct Network Adapter and choose “Uninstall”.
This should disappear from the list.
Open “Network Connections” and see that “vEthernet (Internal Ethernet Port Windows Phone Emulator Internal Switch)” will no longer be present there.
Open Visual Studio, run the project in your desired emulator.
This time everything will work fine and the Emulator will boot up Windows 10 or Windows 8.
I know it's an old thread but just thought I would chime in.
What fixed it for me was going into "Turn windows features on or off"... unselecting all the hyper v boxes... restarting my computer... then selecting all the hyper v boxes again in "turn windows features on or off" and restarting again....
This fixed it for me. I tried the solutions mentioned above but they did not work.
I have struggled for some days with this issue.
After I have read all forums and references, I have found the solution and fixed it. The solution was as following.
https://msdn.microsoft.com/en-us/library/windows/apps/jj681694(v=vs.105).aspx
Interference from other virtualization or networking software and drivers
Other virtualization and networking software and drivers can interfere with the virtual network used by the emulator to communicate with Visual Studio. The types of software that may cause a problem include:
-Virtualization software other than Hyper-V.
-VPN clients.
-Software firewalls.
-Antivirus applications that hook into the network stack.
-Network monitoring or logging tools.
-Other system monitoring software.
After I uninstalled some software to interfere, I can run the emulator successfully.
Hope this help.
Thanks
Open Hyper-V Manager.
Open Virtual Switch Manager on the right side like pictured below:
Remove all Virtual Switches that contain "Windows Phone Emulator Internal Switch" and "Microsoft Emulator NAT Switch" like pictured below:
On Visual Studio, Click on your emulator that you want to deploy your app on.

Can't connect to my windows phone emulator on visual studio 2013

I build an easy App in visual studio 2013, creating it through the windows phone project. The main thing is that it's supposed to fetch data from a API of my choice and write to an XML- document. It worked code-wise but depending on what network I was using(Wireless), It gave me either and error or it worked. It worked if I compiled with my phone as the network supplier, but not on my wireless at home or the schools network.
The error I recived everytime was "the thread has exited with code 259"
I googled for some solutions, and I guessed (Not really sure it was the answer I was looking for) that the error was due because of the phone emulator "takes" my PC's IP adress or network.
They told me to just remove my phone emulator on Hyper-V manager and then just re-start my emulation and it should work.
After this was done, all hell broke lose, cause now, visual studio can't even connect to the emulator.It creates a new phone emulator in hyper-v, but can't connect to it. When I try to compile the app I created it says "Trying to connect to "WVGA 512MB" or if I choose another "WVGA 720". It does this for about 3-5 min and then it says "An error occured. Would you like to continue?"
Now I have no idea what to do. I've googled for almost 2 days and I am at lost. I've un-installed, re-installed, repaired all my visual studio but nothing helps. I am using visual studio premium 2013 if that helps..
I guess this is due to the network issues, as you said the emulator takes the default PC's IP address. But normally after removing the emulator from the Hyper-V Manager and when you try to restart it, it should work.
If none of them works try removing all the Virtual Switches from your Virtual Switch Manager which is within the Hyper-V Manager. Then create a new Internal type of a Virtual Switch and restart your machine. Then try launching the emulator.
For more look into these:
Windows Phone 8 emulator can't connect to the internet
Windows Phone 8 emulator error - Something happened while creating a switch
(WP8) Emulator (XDE) Troubleshooting Tips

Windows phone 8.1 emulator not loading OS

I am trying to launch the emulator (Emulator 8.1 WVGA 4 inch 512 MB, or any other as a matter of fact) but it fails to launch.
It goes to the "Loading OS" screen then throws an error box with the text "DEP6100". On VS, it says at the bottom
Error1 Error : DEP6100 : The following unexpected error occurred during bootstrapping stage 'Connecting to the device': ObjectDisposedException - 0x80131622
and
Error2 Error : DEP6100 : The following unexpected error occurred during bootstrapping stage 'Connecting to the device': ObjectDisposedException - 0x80131622
Looked in the internet but haven't found an answer yet. Can you please help?
Please let me know what additional information you need.
I had the same problem on a fresh install of Windows 8.1 and Visual Studio 2013 Update 3.
Firstly, I went through all of the Microsoft requirements and suggested steps for problems found on MSDN here:
Windows Phone Emulator for Windows Phone 8
After confirming that I met the requirements and none of the possible fix suggestions fixed my problem, I tried the following, which fixed the errors I was getting with the emulator.
I fixed the problem by:
Closing Visual Studio
Going to the "Control Panel"
Selecting "Programs and Features"
Find "Windows Phone 8.1 Emulators - ENU" in the list
Click the "Change" button at the top or right-click and select "Change"
On the "Visual Studio" window that appears; select "Repair"
Wait for the process to complete, and re-open Visual Studio
Run the emulator again and it works this time!
You may have to restart your PC if you left Visual Studio open in order for the changes to take effect. Good luck!
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"
Installing McAfee seemed to block out my emulator... I uninstalled it and restored default firewall settings and it's working for now...
Make sure your processor supports the necessary requirements for running the emulators. After a few hours of trying I finally checked on...and the processor I have doesn't support at least one of the requirements.
Run coreinfo -v - available here - you're looking for an * next to EPT (on Intel) or NPT (on AMD). If it shows a - then you need a different processor. Good luck!
For Windows 10 Emulators 10.0.1.0 (1081p 2gb)
You should Delete all (VHD and AVHD) files in:
C:\Users\MyUserName\AppData\Local\Microsoft\XDE\10.0.1.0\
All will be recreated when the emulator wil restart. Replace MyUserName by you user name.
Should work for other emulator.
See you :)
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).

"Not enough memory..." error when attempting to start windows phone emulator

I actually got this error (image below) sometimes (not always), which means my hardware is fine (?).
Everytime I got this error I tried a walk around by starting the VM inside HyperV Manager (After upgrading to Windows 8.1, unable to run Windows Phone emulator without memory error).
But now, even when I started it, it still didn't work (image below).
The errors occurred when I started using Application Deployment to test a xap file in WVGA (not WVGA 512 MB) emulator, the emulator didn't start and after that whatever version of Emulator I tried, the same error appeared.
I tried deleting all the VMs in VM Manager and then started VS and run the emulator again but it still didn't work. I also restarted windows but the problem remained unsolved. I'm using VS2012 and Windows 8.1.
The primary reason behind this is that your machine doesn't have enough available memory for the VM to launch.
Here is a KB article that was recently posted to get around this by setting a registry key that limits the amount of memory available to the host machine.
http://support.microsoft.com/kb/2911380/en-us
I have used the above fix and it worked for me.
This message is telling you that you have insufficient memory on your PC to start this virtual machine.
Try closing down other applications (such as Visual Studio, any Office apps etc), then starting the emulator in Hyper-V manager. Then you can restart Visual Studio etc.
I've noticed this seems to happen to me more often under Windows 8.1 than I remember happening under Windows 8 on a 4GB RAM laptop.

getting "App deployment failed. Please try again. " while running Windows phone 8 emulator

I am developing Windows phone 8 app. When I try to run the emulator of WXGA or 720p I am constantly getting this error. Searching regarding this error leads to the conculsion that I should not run more and more app parallely. So I ran only VS2012 then also getting the error. I am having enough 4GB of RAM then also having problem. My friend's PC has 2 GB of RAM then also it works flawlessly in it. Anyone know what's the issue & best practice to run the emulator smoothly?
PS : I don't have REAL Windows Phone device :(
Just try rebooting your Windows 8 Phone. I just had the same issue, and rebooting worked for me while deploying on device.
Please ensure you have following to get rid of the error,
Minimum Hardware/software requirements (https://dev.windowsphone.com/en-us/oem?contentName=docs%2FGetting_Started%2FPreparing_for_Windows_Phone_development)
Valid developer license/account to develop windows phone applications
Enough free RAM (>2GB RAM should be free)
Not more than one instance of VS is trying to use same emulator.
If everything is holds good then try following,
Restart emulator & check if it fixed the issue, if not go to next step.
Go to Hyper-V manager and delete all the virtual switches related to WP. If it doesn't fix issue go to next step.
Go to Hyper-V manager and delete all the windows phone virtual machines. repair WP SDK from control panel.
More info about troubleshooting errors like this can be found at https://social.msdn.microsoft.com/Forums/windowsapps/en-US/b06cc9f2-aa5e-4cb3-9df1-0c273e1dfd68/wp8-emulator-xde-troubleshooting-tips?forum=wptools :)
In worst case, you will have to uninstall & install WP SDK.
Hope it helps.
The emulator may not work when its dedicated requirements are not perfectly matched. Emulator Requirements
You can always try deploying an app by selecting 'Device' in the emulator which will actually deploy the app on your phone and you can test it out.
note: Make sure you're using the right version of app which is to be deployed in its righteous OS version.
Also try to restart your emulator/device
Well. This might be happens because of some inner problems of Emulator. Because even me too faced this same problem some days ago. So, let me tel you what I have did and how I got rid of that problem. So, try as per my instruction and if this works. Just Mark it as an answer. else, comment what you have got after.
Check all Emulator VGA and VXGA and 720p
After you got that error, just tap Ok or Cancel in the dialog box and go to
Open Emulator -> Strat Screen will be shown -> goto All Apps -> Check your app name (It will exist and open your app and take screenshots)
I am sure this will be works for you.
Only restart the device or the emulator and the deployment will success