Forum Xamarin.iOS
We are excited to announce that the Xamarin Forums are moving to the new Microsoft Q&A experience. Q&A is the home for technical questions and answers at across all products at Microsoft now including Xamarin!

We encourage you to head over to Microsoft Q&A for .NET for posting new questions and get involved today.

How do I stop 'Please select a valid device before running the application' message?

EasyGoingPatEasyGoingPat GBMember ✭✭✭

Hi,

Similar questions to this have been asked before but none seems up-to-date and relevant to my configuration.

I am running Xamarin.iOS in Visual Studio 2015 with a networked MacBook, which has an attached iPhone4s. When I first got a Xamarin trial (before I paid for the business licence), I was able to debug on this physical device. Now I get the message in the subject line.

I have all latest updates on all hardware. I have tried deleting all \obj and \bin folders and doing full rebuilds. I get no errors in the build output and the signing process appears to go okay. I am able to run fine on the simulator.

Can anyone offer any advice on how to troubleshoot this, please?

Kind wishes ~ Patrick

Posts

  • I have the same issue.

    Have you logged this with support?

  • EasyGoingPatEasyGoingPat GBMember ✭✭✭

    @brucemcmillan said:
    I have the same issue.

    Have you logged this with support?

    I have now. :smile:

    If/when I get this resolved, I will try to post the solution here (assuming I can work out exactly what I did to fix it).

  • EasyGoingPatEasyGoingPat GBMember ✭✭✭

    Hi, @brucemcmillan ,

    This is the reply from Xamarin. Not tried it yet. Will post when I know how it goes.

    Thanks for contacting Xamarin support! It sounds like you may be running into a known issue with the current Stable version of Xamarin. However, we have candidate fix that should resolve this with the following process:

    1. The candidate fix is based off of our current Alpha version. Please upgrade both the Mac and PC to Alpha, using the following guide: https://developer.xamarin.com/recipes/cross-platform/ide/change_updates_channel/

    2. Once both workstations are updated, download and install the candidate fix on the Windows system. Here is a link to that fix: xvs.xamarin.com/Xamarin.VisualStudio_4.0.1.66.msi

    Hope it works for you, Bruce.

    • Patrick
  • Hi,

    I'm going to avoid using an alpha.

    I'll stick to the current process of using visual studio online as a repository and use both the mac and windows machines to build and test on. It's worked so much better / easier than getting these machines to connect and work over the network.

    Ever tried getting two laptops trying to build over wifi ! painful..

    Cheers !!

    B....

  • michaelwarnesmichaelwarnes USMember ✭✭

    got the same problem, any advance on this?

  • EasyGoingPatEasyGoingPat GBMember ✭✭✭

    Versions have moved on a lot since my original question, so I doubt the original response from Xamarin is any use now.

    Things generally seem much better now (probably improvements to the Mac Connection Agent), but I did temporarily have this issue again the other day. I have listed the very simple fix that worked for me below. Note that I am using Xamarin on Visual Studio Community 2015, with a MacBook connected via my local router and an iPhone 5 as the physical debug device.

    1. Again ensure that both Xamarin in Visual Studio and Xamarin Studio on the Mac are both set to the same channel (Stable) and are both up-to-date.
    2. Ensure the physical iPhone is NOT plugged into the MacBook USB.
    3. Boot the PC first and open Visual Studio.
    4. Ensure your iOS project is selected at the startup-project.
    5. Boot the Mac. The little Mac Connection icon in Visual studio should soon turn green as it recognises the Mac. If it doesn't, you can open the dialog and manually click 'Connect'. In any event, wait for an established connection (indicated by a green colour in the icon).
    6. Turn on the iPhone and wait for it to boot fully.
    7. Only now plug it into the MacBook via USB.

    Visual Studio should now see that you have a physical device to debug on. On my system it sometimes switches to it automatically and sometimes I have to pick it from the drop-down list.

    If is doesn't, activate the screen on the iPhone and make sure that it is not asking for permission to connect the PC, which it tends to do after an iOS update (I think).

    Hope this helps.

    ~ Patrick

Sign In or Register to comment.