24

I'm having real trouble when I try to use the IOS emulator from the visual studio. So I created a hello world app in VS using xamarin (latest stable version), I set the project as main project, and When I refresh the connexion with the mac, I can't select the device that should be shown in the selectList. The message is "No device attached" :

error-picture

And if I try to use xamarin studio on the host mac, all is okay, the sample app builds on the iphone emulator:

on mac host

Thanks to help me !

8 Answers 8

67

I know this question has already been answered, but i found it when i had a problem, and it did not help... but i did find the solution:

Under the debugging menu in VS2012, click on Configuration Manager

Configuration Manager Menu

make sure that iPhone Simulator (or iPad, if you want) is set...

enter image description here

Default seems to be looking for a physical device...

hope this helps.

4
  • 1
    That worked for me! Thanks so much TiernanO! I'm new to Xamarin and I spent about 1/2 a day on this issue. You rock!!!! Sep 12, 2013 at 14:00
  • 4
    Also, for the iOS target device drop-down to show up, you may have to manually enable it by going to View > Toolbars > iOS
    – Earlz
    Sep 16, 2013 at 19:04
  • 2
    Thanks for this, saved me a lot of time :)
    – Milen
    Jul 26, 2014 at 15:50
  • This is the solution if you do not have a physical ios device attached to your mac build host.
    – kingdango
    Oct 16, 2014 at 14:38
7

Are you sure the device is connected to the Mac and not the Windows machine? Have you tried debugging from that same device from Xamarin Studio on the Mac?

5
  • thanks. I just edit the initial post to show you that all sounds ok on the mac with another hello world projet-like ;-)
    – clement
    Apr 8, 2013 at 21:15
  • 1
    I put "Debug" - "iPhone Simulator" and I was able to select the device but why it's mysterious...
    – clement
    Apr 9, 2013 at 7:26
  • Your last comment, is that on Mac or Windows?
    – valdetero
    Apr 9, 2013 at 15:08
  • In Visual Studio ! When the connexion is established between computers (green "v" on VS) @valdetero
    – clement
    Apr 9, 2013 at 15:09
  • Oh, dear! I had connected the iPhone to PC, too .... Quickly plugging into the Mac solved the issue. Oct 18, 2016 at 11:11
5

Had the same problem. Issue was when i loaded my solution, visual studio 2012 decided to choose a library project as the 'Startup project'.

Rt Clicked the ios project, chose 'Set as StartUp Project' and the device list was populated.

P.S: Visual Studio you should be old enough to figure this out by now.

1
  • This solved my issue in Visual Studio 2013, the Android project was set to the startup project and Visual Studio was refusing to switch. Once I set the iOS project as the startup project, the device list was populated.
    – sixones
    Jan 11, 2015 at 6:09
4

When I ran into this problem, I had another instance of visual studio running which was connected to the Mac.

Apparently you can only have on VS instance connected at a time.

Check your server log in Visual Studio output window for some more clues:

enter image description here

Closing the other instance of Visual Studio allowed me to connect in the instance I wanted to debug in

3

I discovered something missing. For me, in Visual Studio 2013, for some reason they have removed Solution Platforms from the toolbar. This makes it impossible to switch from iPhone to iPhoneSimulator without opening Configuration Manager. So, to fix this.

Click TOOLS/Customize then select the 'Commands' tab then select the 'Toolbar:' radio button and click the dropdown to the right of it and select 'Standard' as the toolbar you're working on.

Now, click 'Add Command' and select 'Build' from the catagories on the left and then scroll down commands until you find 'Solution Platforms'. Select that one and click OK. Then click the 'Close' button. You will now see an additional dropdown next to the Solution Configurations dropdown on your Standard Toolbar.

This will allow you to easily switch from iPhoneSimulator and iPhone. Use iPhone when you want to plug in an actual device, and use iPhoneSimulator when you want to pick a simulated device.

Hope this helps somebody out. I too have spent lots of time trying to figure this one out when I went from a device and was trying to use the simulator instead.

3

Restarting of Visual Studio 2010 worked for me.

0
2

Different things worked for me (Windows 8.1 & Visual Studio 2013):

  • Restart Visual Studio
  • Set 'iPhoneSimulator' as platform (only working one)
  • In Properties - iOS Application change 'Deployment Target' version to some lower number (6.0 worked for me).
0

As well as checking you have the right startup project selected as per @Chamkila's answer, check that you haven't accidentally broken your project's Info.plist file by attempting to open it through Visual Studio.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.