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

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.

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.

I'm having trouble connecting Visual Studio 2019 to the Microsoft Hololens v2 Emulator for deployment

I am trying to deploy a simple unity app to the Hololens v2 emulator. I followed some tutorials to build the unity files according to the Hololens build framework. The tutorials on Microsoft show there being an option in visual studio 2019 to connect the debugger to the hololens v2 emulator application, but no such option exists on my installation of Visual Studio, despite it being within the stated requirements, version 19.2 or later. Mine is 19.11
My version of Visual studio is 19.11, which should meet the requirement of 19.2 or later
here: https://learn.microsoft.com/en-us/windows/mixed-reality/develop/platform-capabilities-and-apis/using-visual-studio?tabs=hl2
It is shown having an option to target the emulator directly, and an option to target a remote device if using a physical hololens. I have neither option in my debug settings.
What the tutorials show
What my visual studio shows
I attempted to set it up like the remote machine setup shown in the tutorial, getting the correct hololens machine name by accessing the ip address of the emulator, but to no avail, it refuses to connect
It compiles properly, but then comes up with this error when run with those settings (with the correct machine name rather than a filler like I have in the image)
Does anyone have any ideas as to how to fix this? I have updated visual studio multiple times already.
Please make sure the correct project has been selected for the startup project. To change the startup project, you should navigate to Solution Explorer, right-click the desired project and choose Set as StartUp Project from the context-sensitive menu that is displayed.

Deployment error in Visual Studio 2015 while running Xamarin app

I am running visual studio application on genymotion virtual machine. But it shows deployment errors while debugging. It seams it is something with the emulator. I know there are similar questions but none of them solve the problem. Anyone for help?
error occurred:
A numeric comparison was attempted on "$(_DeviceSdkVersion)" that evaluates to "" instead of a number, in condition "$(_DeviceSdkVersion) >= 21".
Solved ( genymotion users)
Go to Genymotion select the virtual device you are using.
Settings>>ADB>>Select the option "Use Custom Android SDK tools">>copy and paste the same location your sdk (like in Visual Studio >>Android Settings >>Android SDK Location
restart genymotion. It worked for me!
Solution actual for emulator, but not for devices. Solution for devices - kill all shuame_helper.exe processes, that takes TCP-port which is required to poll the device's SDK version... Shuame_helper.exe raised every time you reconnect your device to PC..
I seams the problem is with genymotion: there are different paths of SDK path in visual studio and genymotion.
Solution:
First go in Visual Studio-> Tools -> Options. In options choose Xamarin->Android settings. Copy the path in part: Android SDK Location.
Then open genymotion. Choose virtual machine that you will be using. Than settings->ADB-> use custom Android SDK tools, and paste the path there. If you get message that says Android SDK tools found successfully. Close the window and then restart Visual Studio and run your application again.
For more details look at this link
http://enblog.clock-up.jp/entry/2016/06/26/xamarin-android-device-sdk-version-error

How to debug JS on Windows Phone 8.1 Cordova Project

I have been trying to debug a Windows Phone 8.1 app using Cordova on Visual Studio.
I would like to debug the Javascript in the app - set break points and such in Visual Studio.
I have tried Weinre, and it gives me DOM elements, and read logs from console, but I would like to know if there is any way I can set breakpoints in the Javascript and see if a code path is executed and look at the local variables and step-in.
I have tried to search online, but couldn't really find a good way to do this - actually I couldn't find any way that was working.
If you guys were able to find a way to debug Javascripts effectively in Windows Phone 8.1 apps, please let me know :).
Debugging Apache Cordova apps on Windows Phone targets is not yet supported in the current release but you can open up the native Windows Phone project (CordovaApp.Phone.jsproj) that's under the bld\Debug\platforms\windows folder of your Cordova project and you'll have full JS debugging support from within Visual Studio for that one.
Since this is not yet answered: You can debug Windows Phone 8.1 apps perfectly (=breakpoints, watches, ...) using Visual Studio 2015 (e.g. the free community version).

Windows Mobile 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"

Resources