Windows Mobile Debugging - debugging

I am working on creating a windows mobile application and I have a quick question. I have looked around for the answer and cant find anything. Is it possible to run a windows mobile application on a physical hardware device from visual studio? I don't need to be able to debug really, I just would like to be able to select my device and have it build, copy to the device, and run. Is there anyway to set this up?

There is a "Device" toolbar that should let you choose your target device. Check for it under the View -> Toolbars menu (for VS 2008... not sure if you are on a different VS version).
If you are only showing emulators, you might need to install the windows mobile 6 sdk (I don't know for sure, but I do know I also have that installed... could be that this only includes the emulators as well).
Update:
It might also be worthing right clicking on your project in the solution explorer and selecting properties. From the properties page, go into the Device tab. It might be that some devices are listed there that are not listed in the target device drop down list on the toolbar. Worth a shot, but no promises.

It's simple believe me.
I'm currently working on Visual Studio 2008 and I have already installed Windows Mobile 6.0 SDK. It's simple just two steps.
Plug your device to your computer via usb cable then you should see the ActiveSync connected your device.
Open VS and choose from target device menu that "Windows Mobile Professional Device", then push the VS Debug button (it's slower that simulator but it's working perfectly). (look at the picture)
alt text http://img38.imageshack.us/img38/3638/screenhy.jpg
I hope this will be able help to you.

Yes. If it's like mine (Verizon Motorola Q) Visual Studio will copy several files to the device and the device will prompt you to allow them. You only have to do that part once. Then when you debug on your device you may get a prompt to allow the program you're debugging to run. It seems to copy your program over to a folder in the devices "Program Files" folder and runs it from there. And it leaves it there even after you stop debugging.
And one more thing. With Visual Studio 2005, you'll need at least the standard edition to do mobile development. With Visual Studio 2008, you'll need at least the professional edition.

Thanks for the help everyone. My solution was a mix of a couple answers. I had to switch the project to the Windows Mobile 6 Professional SDK first and then I was able to select "Windows Mobile Professional Device"

Related

How do I manage pairing Visual Studio to multiple Mac's?

I work from home and for my job I am using Visual Studio 2022 on Windows paired to a MacinCloud running Big Sur using my company's Apple Developer account for Xamarin development.
In the evenings, I'm playing with MAUI so I'm running the Visual Studio 2022 "Preview" version and I have my own Apple Developer account and my own separate MacinCloud running Monterey.
When I open Visual Studio (either version) it looks like it just tries to pair to the last Mac I used and then it also tries to install updated SDK's etc. if necessary.
How do I manage this? Ideally I want to stop it from auto-pairing and then choose the correct Mac each time.
Thanks in advance,
Paul Lonsdale.
You can open Tools - Options - Xamarin - iOS Settings on Visual Studio on Windows computer. On the Pair to Mac dialog window select "Forget this connection" (right click context menu on the connection).
This isn't really an answer but a workaround. The issue only really happens when both macs are running which is rarely the case. I will, in future, make sure that only the mac I need for the project I am working on is up and running. That way even if VS tries to connect to the other one it will fail.

How do you test touch-enabled apps on a non-touch Windows?

There is no canonical answer to this question (links below.)
I have a desktop Windows app developed using a non-Visual Studio environment (Delphi) and run Windows 7 in a VM, but otherwise standard desktop. I'd like to test some touch features, and so would like to mimic touch on desktop Windows. How do you do this?
Answers gives in other links:
Use the Surface 2 SDK. Installs only if you have VS2010. (I have VS2013 installed currently.)
Inject touch events via a touch injection API. Writing your own touch simulator seems a little surprising, and in addition this reportedly only works on Windows 8.
Use the Windows Simulator. With my Visual Studio 2013 installation, there are DLL files present but no simulator. Googling shows no results for how to install it, or what it is a prerequisite for or installed with, in order to install it by installing something else. It may (?) also work only with Windows Store apps, it's hard to tell.
There are a number of other replies which rely on using Visual Studio.
So, for a Windows 7 desktop machine, using a non-Visual-Studio-developed app, how do you simulate touch?
One simple solution consist to use a TActionList and link it with a TGestureManager. In the Form Property "Gestures" choose a gesture and Create an new action linked with the combobox.
In the TActionList choose the new created Action and put your code in it.
Now, you can simulate the gesture with a call to the action.

Deploying to Windows Phone 10 fails on Visual Studio

So many things happened that I don't know where to start. Seriously, shouldn't this be simpler?
Edit: Someone here knows how can I contact Microsoft to tell this? Or even, can someone tell them about this problem?
I have the last Windows 10 desktop and also have Windows Phone 10.0.10512.1000. I installed Visual Studio 2015 with tools for Universal Apps development (and also 8.1). I have a Lumia 730.
So I connected my phone with my USB cable. Everything fine, the phone gets recognized and I can navigate through the folders.
Then I started Visual Studio 2015 and created a blank universal app. Compiled and tried to deploy. Now this is happening to me: Visual Studio hangs for some moments. Eventually I get an error telling that the device was not found (DEP6200).
I already tried dozens of solutions:
disconnecting from wifi in my laptop and my phone
restarting the IpOverUsbSvc service
rebooting the computer and the phone
deleting the devices in the Device Manager
Registering and Unregistering the phone (it sometimes works)
All of the above with the phone screen unlocked
disabling Hyper-V
disabling firewall
Other solutions that failed miserably
I also tried to use that Windows Phone Developer Power Tools. When I try to use it, it asks me to install some "Phone Tools Update Pack", but when I try, it says that the operation didn't succeed, and also shows the NRE message string (object reference not set to an instance of an object).
I can go through the phone's folders without any problem. I tried to reinstall the drivers... i tried everything.
It's quite sad.
Do you guys can think of some more thing to check?
EDIT: I tested this app before doing all this: https://blogs.windows.com/buildingapps/2015/07/09/just-released-windows-10-application-deployment-tool/
And it worked. If that's the case, is Windows Phone 10 deployment over Visual Studio working already or we have to wait some more time?
Edit2: After making some changes to my app manifest and choosing "ARM" config, now I get this:
1>Deploying to SD Card...
1>Updating the layout...
1>Copying files: Total <1 mb to layout...
1>Checking whether required frameworks are installed...
1>Framework: Microsoft.NET.CoreRuntime.1.0/ARM, app package version 1.0.23117.0 is not currently installed.
1>Framework: Microsoft.VCLibs.140.00.Debug/ARM, app package version 14.0.23019.0 is not currently installed.
1>Installing missing frameworks...
But it just stays there. It's stuck, and it stays there forever. At least I got some info... Its more or less the same steps that WinAppDeployCmd does, but the command line app does it successfully.
Somehow the problem got solved. I created a brand new project and did this:
1 - In your phone, try disabling the developer mode on your phone. What an unexpected development!
2 - Disable the "phone discovery" thingy. I don't know the name of this configuration in english (as my phone is in Portuguese). Just in case.
3 - Choose the correct architecture. This is obvious, right? In my case, ARM. If you try deploying with x86 or x64, it should give you an error. For me, it didn't.
From now on, you should be able to deploy your apps in both developer mode and non-developer mode. It just works, somehow. And it might NOT work for you, sorry. I think I got lucky.
It worked even after a reboot. So the solution is "pretty solid" (in an universe where gelatine is pretty solid).
I had the same problem. I tried the fix of the comment and went to devices manager.
Under USB-Devices there were three Lumia 920s listed.
I selected the second one and clicked on uninstall.
At the end it asked me to restart the Computer. I clicked on NO.
(When I uninstalled the first or third one, it didn't ask me that).
Then the error disappeared (now another common one appears (HRESULT: 0x80073CF6))
I have a Lumia 950 xl, with windows 10 installed, anniversary version. I had the same problem, and my solution was to turn on 'Device discovery' and 'Device Portal', and also keep the 'Developer mode' on.
I believe the only necessary option was the 'Device discovery' though!
Just in case someone still runs into this issue, I had something very similar with my Visual Studio 2015 professional update 1 but I couldn't even deploy to an emulator.
The issue has gone after I upgraded to Visual Studio 2013 update 3.
I had the same issues on Windows 10 with Visual Studio 2015. I updated the the UWP SDK to Anniversary Edition Build 14393, set the target framework to this and it worked. I guess the incompatibility between the device version and sdk version was not allowing the device to be discovered by Visual Studio.

Visual Studio (2013) doesn't list "Device" option for Windows Phone app deployment

I have Visual Studio 2013 with Windows Phone 8 SDK installed. The phone is unlocked and recognized by the machine. However, very often Visual Studio doesn't list either "Device" (not emulator either) in the list of deployment target. If I create a new solution and add a Windows Phone application, then I can see "Device" and emulators in the list, but when I load an existing solution with project of various types, I can only see "Start" and "Attach to IIS" as deployment choices. I tried to delete solution temporary files, but this didn't help.
So what makes VS lose Windows Phone deployment options and is there any way to fix it?
As #WiredPrairie suggested, setting a project as a Startup project (and the single Startup project) resolved this issue. Sometimes you may need to delete *.suo file and reload the solution.
In case anybody has problems in getting the "Device" option in the application toolbar, I noticed that it makes a difference, which programming language you use: using a Lumia from Nokia:
with a windows phone c++ project Visual Studio did not list the "Device", just various emulators, with Windows phone 8.1 visual basic project it did list the "Device" option. Probably there are no c++ libraries on the phone. Just to let you know.

Can you debug from Visual Studio 2012 directly to Microsoft Surface (or any Windows 8 RT tablet)?

I have not been able to find any documentation on if you can run applications in debug from a Windows 8 RT based tablet (such as the new Microsoft Surface) like you can on the iPad or Android devices.
Does anyone know if this is possible, and if so (or not), is there any documentation anywhere pointing to such?
Yes, Visual Studio remote debugging supports debugging an app running on an ARM target. You can find more information "What you need to know about developing for Windows on ARM (WOA)."
Visual Studio has the remote debugging tools for working with external devices and other computers. In a Windows Store application project you go to the project properties and click the debug tab. Choose the target device in the dropdown Debug settings (click to see screenshot)
You'll need the setup remote debug service on your tablet and on your dev computer. The devices need to be on the same network subnet. I'm not sure how that will work on the Surface ARM device, as they cannot join a domain. I guess we'll know more once the hardware ships.
Get your remote debugging tools at Visual Studio Downloads.
Jason Zander has a post about working with ARM devices that might be helpful.

Resources