4

I set up a CI server for Xamarin.Forms using TeamCity on a mini Mac. When I run the build command from the terminal as root it builds successfully, but when I try to fire up a build from the Web UI it fails with the following error:

/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/iOS/Xamarin.iOS.Common.targets(0,0): Tool exited with code: 1. Output: mdimport will not import on behalf of root user. Exiting.

Functino
  • 1,939
  • 17
  • 25
Amr Reda
  • 632
  • 7
  • 18

3 Answers3

0

Amr, I cannot speak to Mac, but in Windows TC installs by default with the system account which would prevent any program/tools installed under a specific user account to run from TC Web UI. In Windows, I had to change the account for the service under which the teamcity server runs. I'm guessing you would have to do the same for Mac.

Stop the TC server service. Change the service user from system to your user. Start the TC server service.

Wilmer SH
  • 1,417
  • 12
  • 20
0

this happens when you do:

sudo mdimport

but not:

mdimport

So, make sure that you currently own the current folder and you have read, write and execute permissions as well.

jaeyow
  • 469
  • 1
  • 4
  • 6
0

The solution is to install TeamCity in the recommended directory which is the /Library/TeamCity folder.

Amr Reda
  • 632
  • 7
  • 18