From VS2017 on my Windows computer, I get several options when setting up my Xamarin iOS project's deployment.
Because with some recent update, nothing from Windows will even build onto the Mac ("The root assembly /Users/[user]/Library/Caches/Xamarin/mtbs/builds/[path]/Debug/[myExe].exe conflicts with another assembly /Users/[user]/Library/Caches/Xamarin/mtbs/builds/[path]/Debug/[myExe].exe", which doesn't make any sense because it's the exact same path and file that's conflicting with itself), I finally gave up and decided to try building the app on VS2017 on the Mac.
Unfortunately, the VS build options are completely different, in the sense that half of it is entirely absent.
In the upper toolbar, near the stoplight buttons that are part of every OS X window, there's a line-triangle icon with no hover (it's facing to the right, though, so maybe it means 'run', or 'play' or something like that? It's 'intuitive', so I have no idea), then a single box that has a segmented dropdown UI element that has '[myApp].iOS > Debug > [line-triangle icon] Generic Device'... but when I click on the 'Generic Device' part, the only options are 'Device - Connect a provisioned Apple device via USB', and 'Build Only Device - Generic Device'.
Unlike in VS on Windows, there's no option for iPhone Simulator, nor any of the simulator options that I see in VS/Windows.
So... how do I use the iOS sim on my Mac to simulate my iOS Xamarin project?
@kylehumfeld said:
In the upper toolbar, near the stoplight buttons that are part of every OS X window, there's a line-triangle icon with no hover
That is the "Play" button, but since you are set to build for device and have no device attached, it gets the little line before the triangle since you can't actually "Play" but the project should build for Generic device if you click that.
then a single box that has a segmented dropdown UI element that has '[myApp].iOS > Debug > [line-triangle icon] Generic Device'... but when I click on the 'Generic Device' part, the only options are 'Device - Connect a provisioned Apple device via USB', and 'Build Only Device - Generic Device'.
What happens if you click on the "Debug" part? Can you select "Debug|iPhoneSimulator"?
If not, then it is an issue of how configurations|platforms are set up for your project or your solution. There is some difference between how Visual Studio on Windows and VS for Mac handle Configuration|Platform combinations.
A recent blog post I wrote may help you here. I would check to see what configurations|platform combinations you have set up for your iOS project and for your solution. You can open the Project Options -> Build -> Configurations to see the configurations you have set up for your project, and Solution Options -> Build -> Configurations to see the solution level configurations, and in the Configuration Mappings tab you can see how those Solution configurations map to project configurations. You can look at a new from template iOS project to see how they are set up by default in Visual Studio for Mac.
Answers
I think this will help
https://forums.xamarin.com/discussion/92773/the-root-assembly-conflicts-with-another-assembly
@Sharma.Sumit , thanks for the reply, but the core of my question is about how to get VS2017 on the Mac to do what I'm used to it doing on Windows. The UIs are completely different in the Build configuration area, and I don't seem to have the option to deploy to 'iPhone Simulator', nor to choose a particular sim as a deployment target.
That is the "Play" button, but since you are set to build for device and have no device attached, it gets the little line before the triangle since you can't actually "Play" but the project should build for Generic device if you click that.
What happens if you click on the "Debug" part? Can you select "Debug|iPhoneSimulator"?
If not, then it is an issue of how configurations|platforms are set up for your project or your solution. There is some difference between how Visual Studio on Windows and VS for Mac handle Configuration|Platform combinations.
A recent blog post I wrote may help you here. I would check to see what configurations|platform combinations you have set up for your iOS project and for your solution. You can open the Project Options -> Build -> Configurations to see the configurations you have set up for your project, and Solution Options -> Build -> Configurations to see the solution level configurations, and in the Configuration Mappings tab you can see how those Solution configurations map to project configurations. You can look at a new from template iOS project to see how they are set up by default in Visual Studio for Mac.
So sorry for that, I didn't read your question carefully, My Bad .
I thought your main problem was "The root assembly /Users/[user]/Library/Caches/Xamarin/mtbs/builds/[path]/Debug/[myExe].exe conflicts with another assembly /Users/[user]/Library/Caches/Xamarin/mtbs/builds/[path]/Debug/[myExe].exe"
Thanks for the replies, @JGoldberger and @Sharma.Sumit. I should be back on the Mac tomorrow, and I'll try fiddling with the configurations as Jon suggested. The iPhone Simulator was not an option in the Debug dropdown, I can tell you that, as that's where I expected to find it.
@JGoldberger I got back on the Mac, and Debug has an iPhone Simulator option. I'm pretty sure it didn't have that before, but if it did, that wouldn't be the first time I've missed something that's staring me in the face. So it looks like I'm good to go now. Thanks!
If you are on a Mac there a way to list all available simulators and real devices, you don't have an option to start them from there though
So if you click on the "simulators" you'll have a lot to chose from. Hope this would be helpful.