Xamarin.ios Error MSB6006: “codesign” exited with

2020-04-02 08:44发布

问题:

When trying to test my app on my device iPhone, I get the following error, I think it's something about registering my device.

/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/iOS/Xamarin.iOS.Common.targets(3,3): Error MSB6006: "codesign" exited with code 1. (MSB6006) (multifacturacion.iOS)

The strange thing is that this same device in another mac with xamarin if it works and with the same project.

If someone can help me with this, I have several days looking for a solution.

回答1:

Open the info.plist and check "Automatic Provisioning".



回答2:

This went away for me after I cleaned the solution in Visual Studio.

(yes this is a complete answer, there are no citations, this is just what I did to fix it).



回答3:

Thing is, I am having this error regularily. I am working with a local developer certificate created on my Mac using a free Apple Id, but without a paid Apple Developer Membership. I am using a Windows based devloper workstation and program in Visual Studio 2019 with Xamarin.Forms 4.0. To get local deployment working again, I need to visit the general settings on my iPhone and remove my trusted account from the list of developer apps under device management which basically not only removes the account but also the app from the device.

Then I need to remove all occurances of the corresponding certificate on my Mac within the Keychain Utility and even the mobileprovision file on my harddrive located somewhere beneath my user directory.

Now I have to Start XCode on my Mac, open the project, I am working on and have it automatically "repair" the signing certificate which basically creates a new one and registers it in the Keychain. The moment I run the app from XCode, I need to always allow keychain access and on my iPhone I can see the account appear in the general settings again which I have to manually trust... again.

THEN I can open the corresponding project in my Visual Studio on my Windows Developer Workstation, rebuild and deploy the app and get no errors.

Without being able to say why, it could happen even the next time I try to build and deploy the app, that this error happens again... this is very (!) inconvenient and I didn't find any real solution for it yet...



回答4:

remove your certificates from keychains and add again, close Info.plist open and fill de information on bundle singing option, that works for me, remember link your device with you provisioning.



回答5:

The answer of Mephisztoe worked for me, except that I am working on Windows and you find the scheme-property in the project-settings and not in the plist-file.

Furthermore be sure that you installed fastlane (just open Extras > Options > Xamarin > Apple-Accounts and click on "install fastlane") and added your Apple-ID there.

I also deleted the certificate with the keychain-utility. That's why I had to reenter my password on the mac as I clicked on build on my windows machine.

With these steps done I can finally work again...



标签: xamarin.ios