Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

cannot get visual studio connected to mac

I've tried to get Visual Studio 2019 (Community Edition) working with a Mac to create a Mobile app iOS and Android. Unfortunatly I'm struggling the whole day wit this combination.

My current issue, which I cannot solve myself is the following error in Visual Studio on Windows:

An unexpected error occurred while checking the SSH configuration of '192.168.178.74'
An item with the same key has already been added.

I tried to change the MAc Address of the virtual machin to get a new IP Adress, without success

my setup:

  • Visual Studio 2019 Comunity with Xamarin
  • Mac OS Catalina in VM Ware on same machine than Windows 10
  • XCode 11.3.1
  • Visual Studio for Mac Community 8.4.8 (build 2)

Btw. I forgot to mention, that it is possible to log in to the Mac via ssh from Windows.

like image 378
thowa Avatar asked Mar 22 '20 23:03

thowa


3 Answers

My fix to this issue was to delete the hosts.key file in this directory

%LOCALAPPDATA%\Xamarin\MonoTouch

like image 125
Sheldon Avatar answered Nov 11 '22 09:11

Sheldon


I had not Monotouch folder, so I created it manually and run VS using Administrator privileges. This solved my problem.

like image 3
Fedir Katushonok Avatar answered Nov 11 '22 08:11

Fedir Katushonok


I was able to get this working. It seems that running chmod og-w "$HOME" on the MacOS device fixed it for me.

However, I'm not 100% sure that was the only step because I've been debugging this for hours, so everything I did might be unnecessary, but if the above doesn't work alone, here is everything I did:

  1. Followed steps from https://github.com/xamarin/xamarin-macios/issues/7882#issuecomment-604330852 to copy old scp (again, don't know if this was necessary)
  2. Restart both machines just so you're sure you have a clean slate.
  3. On the PC, delete contents of %LOCALAPPDATA%\Xamarin\MonoTouch directory (leave the directory itself)
  4. On the Mac, clear contents of ~/.ssh/authorized_keys file
  5. On the Mac, delete ~/Library/Caches/Xamarin/XMA directory
  6. On the Mac, run chmod og-w "$HOME"
  7. On the PC, start Visual Studio and try to connect
like image 1
nexus Avatar answered Nov 11 '22 07:11

nexus