Visual Studio - Connecting to a Mac Server - xamarin

I'm trying my hand at cross-platform development with Visual Studio, and I'm trying to follow a video tutorial on YouTube. I'm running VS2105 on my Win10 computer. I tried to open the Main.storyboard file in my iOS project and this window appears:
I take the only path available, and I'm greeted with this dialog:
...who wouldn't click "Connect", right? Well that gets me here:
...so here I am, wondering what to do next. It looks like Visual Studio sees a Mac, but I've got no idea where it got that impression - I haven't an Apple product of any kind in my home. I thought that maybe there was a virtual Mac running in Hyper-V somehow when this project was created, but come on - Apple ain't gonna go for that.
Can someone explain what's going on here?

It looks like it found a Mac somewhere on the network. You need to enable Remote Login, login to the mac, then put in the username and password for the logged in user.
If this is not your mac, then ignore it. You HAVE to have a mac for ios development. If you want to do iOS, then you need to get one.

Related

How do I manage pairing Visual Studio to multiple Mac's?

I work from home and for my job I am using Visual Studio 2022 on Windows paired to a MacinCloud running Big Sur using my company's Apple Developer account for Xamarin development.
In the evenings, I'm playing with MAUI so I'm running the Visual Studio 2022 "Preview" version and I have my own Apple Developer account and my own separate MacinCloud running Monterey.
When I open Visual Studio (either version) it looks like it just tries to pair to the last Mac I used and then it also tries to install updated SDK's etc. if necessary.
How do I manage this? Ideally I want to stop it from auto-pairing and then choose the correct Mac each time.
Thanks in advance,
Paul Lonsdale.
You can open Tools - Options - Xamarin - iOS Settings on Visual Studio on Windows computer. On the Pair to Mac dialog window select "Forget this connection" (right click context menu on the connection).
This isn't really an answer but a workaround. The issue only really happens when both macs are running which is rarely the case. I will, in future, make sure that only the mac I need for the project I am working on is up and running. That way even if VS tries to connect to the other one it will fail.

Issues debugging Tizen .NET app on Samsung Tizen 5.5 TV Emulator

It seems that there are issues with running and debugging Tizen .NET (Xamarin Forms) apps on Tizen emulators.
My environment is a Windows 10 machine, with the latest 2004 version. For development I tried both Visual Studio Professional 2019 (v16.6.2) and VS Professional 2017 (v15.9.24) with the VS Tools for Tizen extension.
I am able to deploy the application on the emulator however cannot debug, VS fails with the message Unable to start debugging. The system cannot find the specified file and in the console output I can see an the message [StdErr] error: cannot remove forward listener.
Does anyone have any idea? Is there some magical software combination that I can use to make this work or am I missing something?
I've experienced no end of troubles with Visual Studio Tools for Tizen. I nearly gave up today completely, I've spent weeks just getting it to partially work, and only a day or two of actual development, but finally figured out a few things that might be unique to my system or most likely are just missing in the documentation (which is not rare for Samsung at all).
First up, the emulator issue. I'm assuming you've been through the certificate manager and generated a Samsung certificate (make sure to have installed the extensions in the package manager, Samsung wearable extensions and Samsung certificate extensions then run through and create your Samsung certificate in certificate manager).
So now in the emulator manager try "right" clicking the specific emulator and select allow to install applications. It might now indicate it has installed a certificate. This is a good sign. Also i assume you know not to use HyperV (you can look up how to create a bootloader that can enable you to dual boot windows where HyperV can be disabled in one and enabled in your default).
Assuming that worked and you still can't debug i found that you may need to build the application (clean the build for good measure first - remember this - it can save you often if things don't work when you change something), then click Start without Debugging from visual studio. This should install the application to the device and launch it, fingers crossed. Now if that worked, and your application is now running in emulator or on device, you may find that future attempts now to debug it will work.
The final thing which has nearly made me give up is the update to my watch. It recently updated and i noted the new tizen version reported by the watch is 5.5. So naturally i went ahead and changed the api level to 5.5 and hey presto it all just seemed to work and i could continue as before, debugging and changing things happily. Then i uninstalled the application for a dry run and since then I spent a week trying to figure out why it will not reinstall the application on the emulator or the watch ( (it was a week ago i upgraded to api 5.5 and there were no issues, so that was way down the list of anything that could go wrong). I reinstalled etc, did the whole gamut of things all to no avail. At some point i got it working on the emulator but not the watch, finally today i have it working on both and don't wish to develop anything, i'm spent.
So that final issue was resoled by moving the projects back to api 4.0 and they would now reinstall on my watch and my emulator (use the Start without Debugging trick as well to install it first). Also (my fault - why it worked on emulator but not watch at some point) beware if you have one that is api 4 and one is api 5.5 - which i did while i was testing the above (one is a service the other the ui - they were at different api levels - that will not work on a device - but was happy on the emulator).
If none of that works for you, i'd advise give up, life is too short.
Cheers

Problem Running Visual Studio Code on Mac

When I download Visual Studio Code for my MacBook Pro (running the latest version of MacOS, 10.15.1), I get a message:
“Visual Studio Code.app” can’t be opened because Apple cannot check it for malicious software.
Is there a way around this, or is the app being updated?
This is a security mechanism from your operating system. If you trust the app, you can right klick on the file and open it from the context menu. Then you have to confirm again that you want to open it and it should work as expected.

Deploying to Windows Phone 10 fails on Visual Studio

So many things happened that I don't know where to start. Seriously, shouldn't this be simpler?
Edit: Someone here knows how can I contact Microsoft to tell this? Or even, can someone tell them about this problem?
I have the last Windows 10 desktop and also have Windows Phone 10.0.10512.1000. I installed Visual Studio 2015 with tools for Universal Apps development (and also 8.1). I have a Lumia 730.
So I connected my phone with my USB cable. Everything fine, the phone gets recognized and I can navigate through the folders.
Then I started Visual Studio 2015 and created a blank universal app. Compiled and tried to deploy. Now this is happening to me: Visual Studio hangs for some moments. Eventually I get an error telling that the device was not found (DEP6200).
I already tried dozens of solutions:
disconnecting from wifi in my laptop and my phone
restarting the IpOverUsbSvc service
rebooting the computer and the phone
deleting the devices in the Device Manager
Registering and Unregistering the phone (it sometimes works)
All of the above with the phone screen unlocked
disabling Hyper-V
disabling firewall
Other solutions that failed miserably
I also tried to use that Windows Phone Developer Power Tools. When I try to use it, it asks me to install some "Phone Tools Update Pack", but when I try, it says that the operation didn't succeed, and also shows the NRE message string (object reference not set to an instance of an object).
I can go through the phone's folders without any problem. I tried to reinstall the drivers... i tried everything.
It's quite sad.
Do you guys can think of some more thing to check?
EDIT: I tested this app before doing all this: https://blogs.windows.com/buildingapps/2015/07/09/just-released-windows-10-application-deployment-tool/
And it worked. If that's the case, is Windows Phone 10 deployment over Visual Studio working already or we have to wait some more time?
Edit2: After making some changes to my app manifest and choosing "ARM" config, now I get this:
1>Deploying to SD Card...
1>Updating the layout...
1>Copying files: Total <1 mb to layout...
1>Checking whether required frameworks are installed...
1>Framework: Microsoft.NET.CoreRuntime.1.0/ARM, app package version 1.0.23117.0 is not currently installed.
1>Framework: Microsoft.VCLibs.140.00.Debug/ARM, app package version 14.0.23019.0 is not currently installed.
1>Installing missing frameworks...
But it just stays there. It's stuck, and it stays there forever. At least I got some info... Its more or less the same steps that WinAppDeployCmd does, but the command line app does it successfully.
Somehow the problem got solved. I created a brand new project and did this:
1 - In your phone, try disabling the developer mode on your phone. What an unexpected development!
2 - Disable the "phone discovery" thingy. I don't know the name of this configuration in english (as my phone is in Portuguese). Just in case.
3 - Choose the correct architecture. This is obvious, right? In my case, ARM. If you try deploying with x86 or x64, it should give you an error. For me, it didn't.
From now on, you should be able to deploy your apps in both developer mode and non-developer mode. It just works, somehow. And it might NOT work for you, sorry. I think I got lucky.
It worked even after a reboot. So the solution is "pretty solid" (in an universe where gelatine is pretty solid).
I had the same problem. I tried the fix of the comment and went to devices manager.
Under USB-Devices there were three Lumia 920s listed.
I selected the second one and clicked on uninstall.
At the end it asked me to restart the Computer. I clicked on NO.
(When I uninstalled the first or third one, it didn't ask me that).
Then the error disappeared (now another common one appears (HRESULT: 0x80073CF6))
I have a Lumia 950 xl, with windows 10 installed, anniversary version. I had the same problem, and my solution was to turn on 'Device discovery' and 'Device Portal', and also keep the 'Developer mode' on.
I believe the only necessary option was the 'Device discovery' though!
Just in case someone still runs into this issue, I had something very similar with my Visual Studio 2015 professional update 1 but I couldn't even deploy to an emulator.
The issue has gone after I upgraded to Visual Studio 2013 update 3.
I had the same issues on Windows 10 with Visual Studio 2015. I updated the the UWP SDK to Anniversary Edition Build 14393, set the target framework to this and it worked. I guess the incompatibility between the device version and sdk version was not allowing the device to be discovered by Visual Studio.

VS Express 2012, Windows Phone 8 SDK: The interface is unknown

I can't deploy applications to to my Windows Phone 8 device from Visual Studio Express 2012 anymore. I always get the following two lines in the console:
Deployment of application to device failed.
The interface is unknown.
The emulator also does not work anymore (xde.exe just crashes). All that worked once (Hyper-V is active).
All that happened without a change to my app (the same happens with a fresh hello world app).
The problem is not my phone, I tested a different phone (even different model), same problem.
I already completely removed and reinstalled the Phone SDK including Visual Studio.
The problem might have occurred since I updated to Windows 8.1 but I am not sure about this.
If anybody has a clue of what is going on here I would highly appreciate your help.
Since you've already tried removing/reinstalling VS and SDK, try creating a new user account on your Win8.1 box and running VS from that. If it works, the problem was probably some settings in CurrentUser registry hive, which Remove doesn't always clean up. Reinstall the already-installed VS and SDK may work better.
The 'interface' error means this is likely some COM issue, and that implicates registry. If you can figure out which DLL contains the interface, you may be able to fix it with (admin command line) > REGSVR32 <dllPath>. You can trace the registry accesses being made when you try to debug the app via SystemInternals ProcessMonitor

Resources