Bug 60282 - When trying to build Xamarin.iOS from TFS it is not finding our code signing key
Summary: When trying to build Xamarin.iOS from TFS it is not finding our code signing key
Status: RESOLVED ANSWERED
Alias: None
Product: iOS
Classification: Xamarin
Component: MSBuild ()
Version: unspecified
Hardware: All All
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2017-10-19 22:16 UTC by Tony
Modified: 2017-10-21 02:52 UTC (History)
3 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED ANSWERED

Description Tony 2017-10-19 22:16:53 UTC
When trying to build Xamarin.iOS from TFS it is not finding our code signing key - even though I know that the code signing key is in Keychain on the mac where the build agent is running from.

We receive the following error:
Target _DetectSigningIdentity:
				DetectSigningIdentity Task
				  AppBundleName: AppBundleName
				  AppManifest: Info.plist
				  Keychain: <null>
				  ProvisioningProfile: AppName Dist Provision
				  RequireCodesigning: True
				  RequireProvisioningProfile: True
				  SdkPlatform: iPhoneOS
				  SdkIsSimulator: False
				  SigningKey: iPhone Distribution: XXXXXX
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/iOS/Xamarin.iOS.Common.targets: error : iOS code signing key 'iPhone Distribution: XXXXXX' not found in keychain.
			Task "DetectSigningIdentity" execution -- FAILED
Comment 1 Rolf Bjarne Kvinge [MSFT] 2017-10-20 08:51:04 UTC
Keychains are per user, are you sure you're running the build agent with the user that has the code signing keys?
Comment 2 Tony 2017-10-20 15:25:18 UTC
Not sure how to check this - I am logged in as the user that added the signing keys to the keychain? 

That is the user I start the agent from.
Comment 3 Tony 2017-10-20 15:41:45 UTC
There is only one user on the mac - and that is the user I used to run the agent as well as add all the certificates, keys and provisioning profiles. 

It finds the profile- however, it does not find the appropriate key which I know is there.
Comment 4 Tony 2017-10-20 16:47:45 UTC
UPDATE: 

I think I got past the first issue (had to move all my certificates and signing identities to the system keychain and give them trust access. 

However now I get this:

 The specified iOS provisioning profile 'XXXXX Dist Provision' could not be found
Comment 5 Brendan Zagaeski (Xamarin Team, assistant) 2017-10-21 02:52:50 UTC
## Cross-referencing note

The user in Comment 4 has filed Bug 60299 about the "specified provisioning profile ... could not be found" error with additional information, so I will resolve this bug at this time.