How can I run my Windows CE project from within Visual Studio (2003)? - compact-framework

I'm working on a legacy app that needs to be continued in VS 2003; I cannot effectively debug it, though, because when I try to run it, I get the following dialog:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Deploy
Choose the device to target. If the .NET Compact Framework is not already on the selected device, it will be deployed along iwth your application.
Pocket PC 2002 Emulator
Pocket PC Device
Windows CE .NET Device
Windows CE .NET Emulator (Default)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
I am running this (VS 2003) in XP Mode (Virtual Machine) on Windows 7. I do not have a connection (from XP Mode) to the device - a Symbol/Motorola PDT 3090 - so I get, "Unable to connect" when trying to run/debug/deploy in VS 2003.
What has been the case up to now is the developer would build the binary, adding debug messages, and then copy the binary over to the device and run it. Rather than continue this method, I would prefer to be able to debug it from within VS 2003. Is there a way to do this? None of the options (Pocket PC 2002 Emulator, etc.) seem to work...the device is attached to the computer via a usb. The Emulators won't work because they don’t have the necessary hardware (barcode scanner). So I need to use one of the *Device options, but have not been able to connect the usb port to XP Mode.
Does anybody have any ideas on how to debug without the constant copying-and-replacing of binaries, and the use of "show message"?
UPDATE
Alternately, if I can't run the app from within VS 2003 / XP Mode as an emulator, it would also be fine to run it on the attached Motorola handheld, attached via usb cable from the cradle to the desktop computer; I prefer the former, for the debugging capabilities afforded, but even the latter would be better than my current predicament (copying the files to the handheld device, detaching it from the computer, attaching it to the belt printer, firing it up, testing and repeat ad nauseum ad infinitum). ASAP (within two hours), I will set a bounty on this question.
UPDATE 2
If I try to run from VS 2003 in an emulator, and select "Windows CE .NET Emulator (Default)", I get:
"Emulator for Windows CE will not run within another copy of Emulator for Windows CE.
You just had to try, didn't you?"
?!? Is it saying this because I'm in a VM (XP Mode) session?
Then I select "OK" (the only option), and get, "There were deployment errors. Continue?" That trick never works; it even causes the build to fail (a rebuild fixes that, though).
UPDATE 3
Perhaps my problem with not being able to debug by connecting to the device itself is related to this msg I saw when booting up this morning (but I don't know what to do about it, IF this is the problem - do I need to search for a new driver for the Motorola MC3100?):
Devices or applications disabled.
Virtual PC/Windows CE Emulator will cause Windows to become unstable. Windows has prevented these drivers from loading. click here for more details.
The "more details" are:
Virtual PC/Windows CE Emulator
Microsoft
--------------------------------------------------------------------------------
Issue Description:
A driver is installed that causes stability problems with your system. This driver will be disabled. Please contact the driver manufacturer for an update that is compatible with this version of Windows.
Contact Information:
Web Site: http://go.microsoft.com/fwlink/?LinkId=26320
Telephone: 1-800-936-5800
That link (http://go.microsoft.com/fwlink/?LinkId=26320) ended up as: "Internet Explorer cannot display the webpage"
UPDATE 4
There is some headway (or perhaps just false hope) on the connecting to the device front:
I have 4 USB ports on my desktop machine. I plugged the USB cable into the 3rd from the top for the first time a bit ago. It then said it was recognized, and ActiveSync was finally able to make a connection.
So I then tried deploying the app again. The fourth option (the default - C.E. Device Emulator) failed as always. So did the penultimate choice (C.E. device). The second option, though (Pocket PC device), seems to possibly be working.
However, I got a cryptic err msg that just said:
#183:
I dismissed that and since then (it's been a good ten minutes now), the bottom of the VS Output windows has been saying "Launching Application" (with a blinking cursor beneath it) and the task bar has been claiming "Deploy started..."
Whether that is really of any value, though, it doesn't appear to be, as I am just "stuck" there...

Windows CE .NET Emulator (Default)
This should be the one you want, if you are running Windows CE.
The Barcode Reader takes the code and converts it to a string for you, so your code will never need to "decode" a barcode.
So, when you are testing your software using the CE Emulator, simply select the textbox you want to read the barcode to, and type that value in using your keyboard.

In your Windows 7 host PC's task bar, right click on the XP Mode VS2003 application. In the menu that appears select "Manage USB Devices".
Select your Windows Mobile device and hit the "Attach" button. Your XP Mode PC should connect via ActiveSync. (This assumes you've installed ActiveSync on the XP Mode VM. If not, you should do that first.)
Try rebooting the virtual machine. (Not the same as closing and re opening it). If that doesn't work, try a different USB port. You may end up reinstalling XP mode.
See also: How to Access USB Devices in Windows Virtual PC for Windows 7

Related

Universal Windows 10 Emulator not starting up OS

The Windows phone emulator running Windows 10 has been working since I've installed it and last time I used the emulator was a few days ago. Now for some reason when I load my application emulator does not load the OS.
here's the steps I go throuogh to run the app :
-Run "Mobile Emulator 10.0.10586.0 720p 5 inch 1GB (which is my usual emulator to run)"
Message box saying "Configuring Windows Phone for debugging ... "
Another message box appears saying "Click "Retry" to run the emulator in elevated mode. :
You do not have permission to modify internal Hyper-V network adapter settings, which are required to run the emulator
Click retry on the message box
"Are you sure you want to run Windows Phone Packages?" Click Yes
Configuring Windows Phone for debugging box still running
Phone emulator runs but stuck on "OS is starting..."
Message box appears after leaving it running for roughly 15 mins :
"The emulator is unable to connect t the device operation system :
Couldn't set up the UDP port. Some Functionality might be disabled.
will add this to the steps"
I've followed the instructions from forums to go to Hyper-V Manager and delete the virtual switches and virtual machines - which doesn't work. And I also have Hyper-V enabled on windows features.
Any other solutions would be appreciated, Thanks in advance!
UPDATE : so I've left it running just to see if it works eventually, now another message box appears saying :
The emulator is unable to connect to the device operation system : Couldn't set up the UDP port. Some functionality might be disabled.
UPDATE : So I managed to fix it .. a little. It works for the other apps I have as well as newly created universal windows projects. But this specific app doesn't . I notice that this specific one has the "Configuring Windows Phone for debugging" message pop up whereas the other ones don't.
Why not start fresh?
New OS, new install, everything from scratch.
And don't forget to not play with UAC, OS permissions, the firewall, and do not install anything which would install virtual network adapters. Like OpenVPN, USB modems (including an iPhone), etc.
This is a solution, because your problem could be anything.

Getting Error "Unable to connect to a phone. Make sure the Windows Phone IP over USB transport service is running"

I bought a Lumia 630 dual SIM recently and has been trying to register my phone for development, but kept getting this error "Unable to connect to a phone. Make sure the Windows Phone IP over USB transport service is running".
What i use to register my phone is Windows Phone Developer Registration(8.1), and the method i have tried:
Restart IpOverUsbSvc service.
Restart phone, and turn off Set Automatic in date+time.
Any help on this will be highly appreciate as I have already spent 2-3 days trying to connect the phone.
Thank you.
Unplug the USB cable and try a different port, try also a different USB cable, and restarting the Windows Phone IP Over USB Transport service...
Take a look at this thread....
Hope it helps
I had to go to Control Panel > Administrative Tools > Services
and start the
Windows Phone IP Over USB Transport Service.
My device is now working.
I tried all the solutions proposed above, but was unable to get the tool to recognize the phone. The phone appeared in Explorer, but the registration tool just couldn't see it. Then I stumbled into this article:
http://toddbaginski.com/blog/fixing-windows-phone-developer-registration-tool-errors/
Basically, you go into Device Manager and uninstall all the USB composite devices. After Windows reinstall drivers for the phone, the registration tool should now be able to see it. It worked in my case, at least.
To uninstall a Windows Phone device
Open Device Manager.
Double-click in portable devices.
Right-click in windows phone, and then click Uninstall.
Click OK to complete the uninstall process.
To reinstall Windows Phone device
In Device Manager, in the Action menu, click Scan for hardware changes.
Just remove the windows phone device from ->Control Panel ->Hardware and Sound->Devices and Printers Options and again add it back.
In my case, IpOverUsbSvc service was completely missing in the list of services.
I assumed it happened when I removed Windows phone support from Visual Studio 2015 and tried to debug app from VS 2013.
Repair of Visual Studio 2013 fixed the issue for me.
Hope that may help someone.
If you try all of Kulasangar's tips and still don't have success, try a different USB cable. Despite the directions stating you must use the one that came with your Windows Phone, that didn't work for me. I took a 3rd party's cable in desperation and that worked immediately.
Hope that helps.
If you encounter the below error message while developing app for Windows Phone.
Error Message:
“Windows Phone IP over USB Transport (IpOverUsbSvc) is not running. Retry after starting Windows Phone IP over USB Transport (IpOverUsbSvc) from the services management console.”
The cause of the error is that the service “Windows Phone IP over USB Transport (IpOverUsbSvc)” is not running. It is very simple to resolve in error.
Simple header over to services.msc. Look for “Windows Phone IP over USB Transport (IpOverUsbSvc)”, the status should be empty or automatic. Right click on it and select Start.
After doing that, try to deploy your app again and it should work fines.
I faced the same problem.
Solution
Apart from changing USB cable, restarting, we can do following steps:
1.Set the correct date and time
2.Change the device name [ From your PC, you can simply change device name]
3.your device must have internet connection.

Preload USB.inf and with VID/PID for hardware product (USB-HID) - Windows XP

Description of the problem:
Insert USB-HID Device (Barcode scanner) on a clean Windows XP Machine.
After windows loads the USB-HID Driver.
Windows XP pops a dialog box asking the user to reboot the machine. (This is the problem)
Scenario:
Remotely Deploy a software package to talk to these devices. (no hardware at this point)
Remotely reboot machines.
Hardware is added to each machine. (no reboot)
Investigation:
Windows adds a control class referencing the "usb.inf" file.
Windows adds a device class referencing the control class.
Windows adds a enumerates the device referencing the device and HIDClass.
I believe what needs to be done is to "Pre-load" or "Pre-install" the driver, but we do not provide the INF files (provided via usb.inf).
Our other drivers utilize dpinst to handle installation on a different driver interface (btw this procedure does work for the desired behavior), but we are providing those INF / CAT / SYS files.
Is it possible to leverage SetupCopyOEMInf to perform this function?
What other avenues could be pursued to pre-load/pre-install this driver?
As it turns out, the problem was connecting to a device before it had enumerated its sub devices, locking the device tree, which caused the 'please reboot windows' dialog to appear when the last device enumerated.

the windows phone emulator wasn't able to create the virtual machine

I just installed it on my windows 8. It's NOT running on a VM but is running at a macbook with bootcamp.
When I try to emulate my app, I get this first error:
But then I click "Retry" and give the permission, so it runs normally.
But then, when the windows phone window appears, I get a "loading" screen and then this error appears:
Just for better tagging the post I will write the error: "something happened while creating a switch: Xde couldn't find an IPv4 adress for the host machine"
You must enable virtualization in BIOS and go to Control Panel->Programs->Turn Windows features on or off and choose Hyper-V.
I had this problem.
1- Open the Control Panel.
2- Then programs.
3- Turn Windows features on or off.
4- Further selection for hyper-v.
5- Restart the computer.
6- Repeat the previous steps but put the selection on hyper-v.
7- Restart the computer.
Enjoy ^_^
Not sure if you got to the solution, but I just had the same situation. It turns out that older VPN clients may have compatibility problems with Windows 8. I solved the issue by uninstalling VPN client (and also making sure Hyper-V was enabled).

Starting the WindowsPhone 7 emulator crashes running instances of VMWare (Server)

I have a machine running Windows 7 Professional SP1 directly on hardware.
I use this machine for all developing stuff. As this includes web– as well as WP7–development I have some virtual linux-hosts running inside VMWareServer2 for my webdevelopment.
As soon as I start the WindowsPhone emulator (natively, not inside any of the VMWare client-instances) all the VMWare machines stop working and remain unstartable upon restart of my Windows 7 machine.
It seems, that the launch of WindowsPhone emulator (which is a virtual machine itself) crashes VMWareServer and keeps it locked down even after the WindowsPhone emulator was closed.
How can I prevent the WindowsPhone emulator from crashing VMWareServer?
Have a look at this blog post, he seems to have the same problems as you and found a work around... Although not an idea one he had to disable hardware assisted emulation in VMWareServer.
VMWare themselves just say to uninstall the competitors emulator... as if that was an option
http://pcbl.de/2011/06/13/round-1-fight-windows-phone-7-emulator-x-vmware/