Visual Studio For Mac Network Is Not Reachable

  1. RTM_ROUTE_FLAGS_LOCAL 0x0010 Indicates a destination is on a directly reachable network. RTM_ROUTE_FLAGS_REMOTE 0x0020 Indicates that the destination is not on a directly reachable network. RTM_ROUTE_FLAGS_MYSELF 0x0040 Indicates the destination is one of the router's addresses.
  2. Sep 13, 2016  The Visual C++ for Linux announcement post has been updated with the content below. If you are already familiar with this extension this post covers what is new since our last update. We recently posted new bits for our 1.0.5 release of the Visual C++ for Linux extension for Visual Studio.
Active1 year, 11 months ago

While using the Mac Agent, you may come across build errors. Looking at the logs you will find the Mac Agent was disconnected and you have to connect again. While annoying, the fix is to reconnect again.

I'm continuing my adventure with Xamarin.

I'm developing an Xamarin Forms application with a Portable Class Libraries (PCL).

I have compiled and debugged my application by Android, but now, I'm interested to run the application in iOS to test in this platform.

I have a problem with the connection between my PC and the Mac.

I have a PC (Windows 8.1) with Visual Studio Community 2015 with Xamarin tools installed.

In my Mac Mini, I have installed OS X (v10.11.3), XCode (v7.2) and Xamarin Studio. I have logged in with my Xamarin account.

In the two machines I have the same Xamarin version.

I have followed the Xamarin walkthrough.

On Visual Studio I open the Xamarin Mac Agent. It finds my Mac Mini. Then it asks me the Mac credentials (user and password).

The login works at this point.

Then, in the solution, I set the iOS project as the startup project. I clean the solution, I build again and start the compile/debug process (F5).

Mac Network Accounts Are Unavailable

In this point, the output retrieves a message:

Mac network diagnostics

1> Connecting to Mac server Macs-Mac-mini.local...

1>C:Program Files (x86)MSBuildXamariniOSXamarin.iOS.Windows.After.targets(54,5): warning : Could not authenticate the user using the existing ssh keys

1>C:Program Files (x86)MSBuildXamariniOSXamarin.iOS.Windows.After.targets(54,5): error : Unable to connect to Address='Macs-Mac-mini.local' with User='macmini

I have used Putty (SSH Client) to check with my user/password if I'm able to connect to Mac, and I have had success.

Into /Users/macmini2/.ssh/authorized_keys file (Mac machine) each time that I use the Xamarin Mac Agent, Visual Studio adds a new key entry (it adds the same repeated).

I see that perhaps the problem is related with ssh keys.Why I have this problem? What am I doing wrong?

A thing that I have tested was openning the Xamarin project directly in Mac with Xamarin Studio, build it and run the simulator. It works.

I have seen other similar question, but I think that it doesn't have the same problem.

EDIT:

More specific information about the error when I try to compile/debug:

EDIT 2:

I have revised the troubleshooting Xamarin page, specifically that it says 'Unable to authenticate with SSH keys. Please try to log in with credentials first'.

I have run:

And the content of the file is:

But now I don't know what I have to do to solve it.

Community
stivexstivex
3621 gold badge3 silver badges19 bronze badges

13 Answers

You have to try delete everything from

It helped me, I had the same (or similar) problem today.

danio
5,4184 gold badges33 silver badges52 bronze badges
Dmytro BondarenkoDmytro Bondarenko

I have found the solution about my problem. I have done the following steps:

  1. In my Windows: I have removed the content from '%localappdata%XamarinMonoTouch.'
  2. In Mac terminal: Remove the authorized_keys Mac file ('rm /Users/macmini2/.ssh/authorized_keys' in my case)
  3. In Mac terminal: chmod g-w /Users/macmini2/
  4. In Mac terminal: chmod 700 /Users/macmini2/.ssh/
  5. In Mac terminal: Create a empty file: /Users/macmini2/.ssh/authorized_keys (with vim, for example)
  6. In Mac terminal: chmod 600 /Users/macmini2/.ssh/authorized_keys
  7. On Visual Studio: Login with Xamarin Mac Agent
  8. On Visual Studio: Run the application with [Debug] - [iPhoneSimulator] - [iPhone 5 iOS 8.1]
  9. And finally, the simulator runs on Mac computer.

This link helped me.

stivexstivex
3621 gold badge3 silver badges19 bronze badges

Xamarin has a Troubleshooting page with large focus on SSH issues:

Specifically these two:

Log File Location

Network

The log files can be located by browsing to Help > Xamarin > Zip Logs in Visual Studio.

'Unable to authenticate with SSH keys. Please try to log in with credentials first'

Known cause:

Furthermore there is this section, which does not directly match the error you are seeing but goes into some detail on SSH configuration and diagnosis:

'Couldn't connect to MacBuildHost.local. Please try again.'

Reported causes:

MarakaiMarakai

I have just solved this problem!It was nonsense.

To connect Visual Studio Xamarin project and simulate that on Mac when you get:

Couldn't connect to computername.local please try again later.

What you need to do next:

  1. Follow the solution from xamarin community about mac connectionafter this point if everything OK, you will connect, but if no..
  2. Install XAMARIN STUDIO on MAC. After installation start XAMARIN studio, create your own app and run with simulator
  3. Close app and try to connect again from Windows computer.At this point you will make synchronization and that's all.

Problem solved! I hope this will be useful for somebody.

Visual studio for mac network is not reachable magnetic ceilingThe One and Only ChemistryBlob
4,9897 gold badges26 silver badges54 bronze badges
Jevgenij KononovJevgenij Kononov

For me helped next solution:1)On Windows open Visual Studio:Tools=>Options=>Xamarin=>Other and click in Check Now

2)On Mac open Xamarin Studio Community (https://www.xamarin.com/download)Xamarin Studio Community=>Check for Updates... (and download last one)

After updates all works fine.

Andriy GrytsivAndriy Grytsiv

I tried a few of the solutions mentioned here and had no success.

However (though not ideal) if I run Visual Studio in Administrator Mode I can successfully connect. Could be a work around for some until a better solution is found.

SuperAazSuperAaz

For what it's worth I just solved this issue by checking the logs as noted above and in the Xamarin Troubleshooting docs. It turned out to be mismatched iOS versions. Once I updated the Mac version it worked.

brhealbrheal

This is not perfect solution, but made success in my case

Your mac account should not contain any special characters- This is limitation in connection to mac from windows

company-mac1 --- wrong

comapanymac1 --- Correct

Sanjeev RaoSanjeev Rao
1,5521 gold badge12 silver badges16 bronze badges

In my case, i installed mono sdk on my mac it solve the problemhttp://www.mono-project.com/download/#download-mac

hkguilehkguile
1,72510 gold badges49 silver badges103 bronze badges

Ignored the agent that Visual Studio wizard showed. Something about the Mac computer name VS didn't understand.

I did 'Add Mac', used the IP address, then it connected. That was annoying.

AxleAxle

Did you turn on remote login and that is the user/login that is currently logged into the machine? Also, have you tried connecting directly to the IP address instead of the DNS name?

I am on a client's network (different domain than mine) and my VS would never connect via the computer name. I always had to type in the IP address. Also, watch the out put for 'Xamarin' in the Output panel/window and see if it gives any more helpful information.

valdeterovaldetero
3,9211 gold badge27 silver badges42 bronze badges

I had this problem recently (despite having enabled Sharing on the OSX host and checking firewall) and it turned out that both OSX Machine and Windows Machine needed the exact same version of Xamarin.iOS and a restart.

Updating both, restarting both, solved the problem for me.

Dr. ABTDr. ABT
15.6k5 gold badges62 silver badges131 bronze badges

Mac Network Utility

I think what fixed it for me was opening git bash then running ssh onto the mac box. After saying Y to trusting credentials it worked.

PelletPellet

Not the answer you're looking for? Browse other questions tagged macosdebuggingvisual-studio-2015xamarin.iosxamarin.forms or ask your own question.

Please complete the security check to access this website.

Why do I have to complete a CAPTCHA?

Completing the CAPTCHA proves you are a human and gives you temporary access to the web property.

What can I do to prevent this?

Amc Network

If you are on a personal connection, like at home, you can run an anti-virus scan on your device to make sure it is not infected with malware.

Visual Studio For Mac Network Is Not Reachable Synonym

If you are at an office or shared network, you can ask the network administrator to run a scan across the network looking for misconfigured or infected devices.