VSTS - Xamarin iOS Build - How to choose the mono version to use?


VSTS - Xamarin iOS Build - How to choose the mono version to use?



I'm building a Xamarin iOS project on the Hosted macOS Preview queue of VSTS.
The log shows that it uses mono 5.8.0. However, the queue specs show that mono 5.10.0 is installed.



The question is how can to choose the version of mono to use (amongst those installed) to build a xamarin ios project on vsts?



UPDATE



Itried the following after @valdetero's answer


- task: XamariniOS@2
displayName: 'Building iOS'
inputs:
solutionFile: '**/*.sln'
configuration: 'Release'
mdtoolFile: '/Library/Frameworks/Mono.framework/Versions/5.10.1/bin'



However, I got that error:


[error]Xamarin.iOS task failed with error Error: Unable to locate executable file: '/Library/Frameworks/Mono.framework/Versions/5.10.1/bin'.





Do you try to set Mono Runtime environment variables: docs.microsoft.com/en-us/xamarin/ios/troubleshooting/questions/…?
– Cece Dong - MSFT
Jun 29 at 10:31





I can't find which variables to set. Would you know?
– François
Jun 29 at 13:49





I'm not familiar with Xamarin, but you may check -bind-to-runtime-version parameter to the --aot command line option: docs.go-mono.com/?link=man%3amono(1)
– Cece Dong - MSFT
yesterday


-bind-to-runtime-version


--aot




1 Answer
1



In your Xamarin.iOS task, open Advanced, check MSBuild, and look at build tool path. Specify an installed version of mono here. I used this for an old project where I can't build it with Mono 5. Here's what I have in the box:



/Library/Frameworks/Mono.framework/Versions/4.8.1/bin



Put that entire path in the box.





I tried and it doesn't work yet.
– François
Jun 29 at 19:34





On your build machine, what versions are listed in the folder /Library/Frameworks/Mono.framework/Versions/ ? (Open Finder -> (Top Menu) Go -> Go To Folder)
– valdetero
Jun 29 at 19:45


/Library/Frameworks/Mono.framework/Versions/





This is a vsts hosted machine not one I can access directly (see the specs link in the question).
– François
Jun 29 at 19:47





What version of the task are you using?
– valdetero
Jun 29 at 19:55





see questions's update: XamariniOS@2
– François
Jun 29 at 19:56






By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Comments

Popular posts from this blog

paramiko-expect timeout is happening after executing the command

Opening a url is failing in Swift

Export result set on Dbeaver to CSV