how to connect to remote mac with xamarin/visual studio? - c#
Just installed Visual Studio Enterprise 2017, hoping to use Xamarin to develop iOS apps, which I have abandoned in the past due to connection issues with Xamarin.
No matter what I do, Xamarin will not reliably connect to the Mac on the network. It did connect once but, suspecting my old Mac is too slow to avoid timeout issues with Xamarin, I rented a cloud Mac from MacInCloud.com. Xamarin still won't connect to the remote, even though I can SSH to it via Putty.
Does anyone have a system that works reliably, or know of a good way to troubleshoot this? Xamarin error reporting and logging does not seem to help in any way.
Take a look at this example in xamarin developer page :
https://developer.xamarin.com/guides/ios/getting_started/installation/windows/connecting-to-mac/
Windows Setup
Make sure to install Xamarin tools on your Windows machine.
Connecting
There are two ways to connect to the Mac build host:
On the iOS toolbar:
Or by browsing to Tools > Options in Visual Studio, selecting Xamarin > iOS Settings and clicking the Find Xamarin Mac Agent button:
Navigating either way will lead to the Mac Agent dialog, illustrated below:
This will display a list of all the machines that have either been previously connected and are stored as known machines, or machines that are available for Remote Login.
Select a Mac by double-clicking on it to connect to it. The first time that you connect to a Mac, you will be prompted to enter your Mac user credentials (which must be an Administrator account) to allow the remote connection:
The agent will use these credentials to create a new SSH connection to the Mac. If it succeeds, an SSH key will be created, and will be registered in the authorized_keys file on that Mac. On subsequent connections the agent will use the username and key file to connect to the most recently connected known build host.
Note: You must use the username and not the full name when entering your credentials. You can find this out by using the whoami command in Terminal. For example, from the screenshot below, the account name will be amyb and not Amy Burns:
When a connection has been successfully made, it will display in the Host Selection dialog with a connected icon next to it, as illustrated below:
There can only be one connected Mac at any one time.
Each machine in the list, whether connected or otherwise, will display a context menu on right-click, allowing you to Connect, Disconnect, or Forget the Mac as needed:
If you choose to Forget this Mac, you will need to re-enter your credentials to connect to it again.
Manually adding a Mac
In certain circumstances, you may wish to manually add a Mac if you cannot see its mDNS name listed in the Host Selection dialog. To do this, follow the steps below:
Locate your Mac’s IP address by either browsing to the System Preferences > Sharing > Remote Login on your Mac:
Or, if you prefer to use the command line you can find out your IP address by entering ipconfig getifaddr en0 into Terminal (Note that depending on the type of connection the variable might be en1, en2 etc.):
Return to Visual Studio and in the Host Selection dialog, select Add Mac...:
Enter the IP address of you Mac into the Add Mac dialog and click Add:
Finally, enter the username (not full name) of your Mac admin account and the corresponding password:
Once you click Login, Visual Studio will log into the Mac machine using SSH and will add this Mac as a known machine.
Command Line Support
The new agent also supports building a Xamarin.iOS configuration from the command line. To use it, you will need to pass the following required parameters to MSBuild:
ServerAddress – The IP address of the Mac server.
ServerUser – The Username (not Full Name) to be used to log in to the Mac Server.
ServerPassword – The Password used to log in to the Mac host (optional).
The ServerPassword parameter is not required.
Instead, the first time a password has been passed, either by using Visual Studio or the Command Line, for that particular Windows, Mac, and user configuration a key pair will be generated and stored on the Windows machine for future use. It will be located in %localappdata%\Xamarin\MonoTouch\id_rsa. If you do not pass the ServerPassword parameter, the id_rsa keyfile will be used for authenticating.
An example command to connect to Mac 10.211.55.2 using xamUser account with password mypassword is shown below:
C:\samples\App1>msbuild App1.sln /p:ServerAddress=10.211.55.2 /p:ServerUser=xamUser /p:Platform=iPhoneSimulator /p:ServerPassword=mypassword
Have had same problem since I upgraded to VS 2017. Two things happened just now:
Upgraded my Macincloud MacOS to Sierra. Still couldn't connect.
Noticed an Update to VS 2017. Installed it.
Now I can connect the Mac Agent and run simulations on the Mac.
Related
Vs code remote Ssh Connection issue
I have been using VS Code and connecting remotely from home on my company computer to our Centos System via using SmarTTy. But I want to use VS code Remote SSH instead of SmarTTy due to the fact that SmarTTy doesn't have a good UI and I think it's obsolete. I faced some problems when I have created connection. I am sharing my conf. file Host app-ff HostName app-ff User cayhan IdentityFile C:\Users\cayhan\.ssh\id_rsa I click 'Connect to Host Current Window' and ask me operating system (linux,windows,macos) and after that ask me password. Although everything is correct I can't access it with VSCode and get error 'Could not establish connection . Permission denied' How can I solve this problem
Windows has CLI ssh client now. You can open terminal in VS code and use ssh -i id_rsa username#IP
network connection error running CE emulator in VS2008
I have read through the previous answers on this topic as well as other coverage online. But I still can't get this working. I have not worked with CE/hardware code before. I am working with legacy code for a barcode scanner in VS 2008 and deploying the application as "USA Windows Mobile 5.0 PocketPC R2 Emulator." Initially we were getting an error that the emulator could not connect to the rest server that I was running on my machine. After researching that, I decided to host the rest server on a different machine to avoid the issue. Calls to the rest server work fine using Postman. ERROR: Now when I attempt to run this solution, the rest calls return the error "Could not establish connection to network." ATTEMPTED FIXES: I can't get a network connection to work by playing with the settings under: File -> Configure -> then select Network tab on the Emulator Properties dialog. Selecting the "Enable NE2000 PCMCIA network adapter and bind to:" does not work: Every option under this results in an error that "The required Virtual Machine Network Driver could not be found. Make sure that Virtual PC 2007 is installed. You can install ..." But of course, I cannot install because Microsoft has stopped supporting this stuff at all. I tried selecting the "Host-only networking" option. I tried using Tools -> Device Emulator Manager in Visual Studio and setting the emulator to "Cradle" set up conn with my ip and dns Why does Microsoft still hate developers?? :(
How to setup Appium to IOS phone and Mac emulator in the cloud
I am using a MacInCloud provider for the Mac and I am trying for my Appium to connect to it. I have entered the remote host xxx.xx.xxx.xx. the remote port xxxxx and the remote path https://foo.macincloud.com/rdpdirect.html?server=bar but for this to work I would need to enter username and password then open the simulator or if that's enough access the real IOS device connected to my pc where the Appium is installed and Visual Studio that is paired to the MAC.
It looks like I would need to use a higher account and pay for that to be able to use Mac in cloud.
Cannot deploy UWP app to raspberry pi 3
I'm getting an error : Error: Unable to connect to the Microsoft Visual Studio Remote Debugger named 'minwinpc'. The Visual Studio 2017 Remote Debugger (MSVSMON.EXE) does not appear to be running on the remote computer. This may be because a firewall is preventing communication to the remote computer. Please see Help for assistance on configuring remote debugging. I'm trying to deploy an app to my RPI 3 running Windows 10 IoT Core v.10.0.16299.15. I've tried: Reinstalling Visual Studio 2017 Installing Visual Studio 2017 Remote Debugger. Restarting the VS. I noticed that Visual Studio 2015 remoter debugger is running on raspberry pi and it has 192.168.0.6:8116 as a remote machine name while in VS2017, rpi's address is 192.168.0.6:4002. Why are they different? Can someone help me?
As Martin & Belekz mentioned,you can check the configuration of target device and firewall setting.And more,I want to add that,please note the configuration of Authentication Mode.You should set it as "Universal(Unencrypted Protocol)".Use the mode whenever you are deploying to a remote device. Currently, this is for IoT devices, Xbox devices, and HoloLens devices, as well as Creators Update or newer PCs.
Look at my post here i have the same problem and i tried several things, but only after i done this i can deploy remotely to pi again: Uninstall old 16299 SDK and download new 16299 SDK from here Repair VS from VSInstaller run sfc /scannow Also make sure you're using Universal authentication mode and type the ip without port number (or even using 'minwinpc' is enough) hope this helps
I never deployed software from VS to a RPi using an port in the IP address before. So maybe you are doing something special, or I'm doing something basic, but; dubble check if you need to assign a port. Start Windows 10 IoT Core Dashboard and check if the Pi is visible in your network. --> If not, try to ping to your Pi, using the CMD ping 192.168.0.6 --> If the ping fails, check your IP address of your Pi with a physical monitor. Check the address in the build properties according to the steps above. Hope this helps!
You can configure the remote debugger's IP address and port to point to the correct endpoint of your Remote debugger. Right-click the UWP app project, choose Properties, and in Debug tab you will see Start options with Target device which should be set to Remote Machine and below you can manually enter the Remote debugger's IP address and port into the Remote Machine field (192.168.0.6:8116 in your case). You should include the 8116 port in the Remote Machine field as well. This should make Visual Studio connect to the Remote debugger instead of the RPI itself. Also try to turn off the firewall to verify if it does not interfere with the connection.
i have see same problem in my laptop. i solve this problem by following steps.. first of all can you install Windows 10 IOT SDK in your .net? if no then first of all download and install. otherwise update vs 2017. when install vs 2017 then automatically install iot sdk.
How to make the watwp.codeplex.com NuGet Phone.Storage.Sample application work?
I am interested in working with blob storage from a Windows Phone app. The Windows Azure Toolkit for Windows Phone should enable this. http://watwp.codeplex.com/ They have a sample application on NuGet which you install in a default WP application from VS, by running the command: PM> Install-Package Phone.Storage.Sample, in the Package Manager Console http://www.nuget.org/packages/Phone.Storage.Sample The only configuration needed to run the app is to change the default navigation page in WMAppManifest.xml to "/Pages/StoragePage.xaml". But when I try to run this sample application in a default WP app from VS, I get the error: "The value for one of the HTTP headers is not in the correct format. RequestId:38df4766-0da8-4212-84a1-3da0c994a876 Time:2012-06-06T14:50:02.0209600Z" Any idea what to do to make it work?
As you just made one changes in your sample, I believe you are using Azure Storage Emulator. Have you verified if Azure Storage Emulator is running. Also be sure to have a physical network in your main machine rather then virtual network to connect as i have seen such problem with virtual network and loopback address. It is very much machine specific issue as I just tried to exact same step with no error. There could be any random error for this issue and while you try to restart the machine, re-install sdk and other components and it will go away. I can help you to find some ways to trouble shoot it: When you run this application in WP emulator, while using Development storage the HTTP request pass through localhost:PORT/storage_container means the network traffic is on localhost so you can run fiddler to capture traffic on 127.0.0.1 (by default it is not set so you need to configure it. Once you have network trace you can find the root cause however it would hard to find the fix, as i have seen in past.