Bug 18357 - Can not build IPA file VS2013
Summary: Can not build IPA file VS2013
Status: RESOLVED FEATURE
Alias: None
Product: Visual Studio Extensions
Classification: Xamarin
Component: General ()
Version: 1.10.x
Hardware: PC Windows
: Normal normal
Target Milestone: 3.4 (Alpha)
Assignee: vsx
URL:
Depends on:
Blocks:
 
Reported: 2014-03-13 12:02 UTC by Szilárd Széll
Modified: 2014-07-19 06:26 UTC (History)
7 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 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 FEATURE

Description Szilárd Széll 2014-03-13 12:02:14 UTC
Hi,

Unfortunately I can not build IPA file from VS 2013 (Under Win 8.1)
Running app on the simulator works well.
Both sides have the latest versions of Xamarin.iOS. (1.10.39 on PC)
I got the following message to the Mac Server Log:

Project "XXXXX.csproj" (_RemoteBuild target(s)):
Server command 'Build': application remote build failed
Command execution task ended with exception
Exception System.Net.WebException: The remote server returned an error: (500) Internal Server Error.
Exception details can be found in the log file


Remote build step failed.
Done building project "XXXXX.csproj" -- FAILED.

Mono.IOS.VisualStudio.MonoTouchPackage Error: 0 : Xamarin.iOS encountered the following error(s):
System.Exception: Remote Build Error while Publishing (Generic)
A build error occured on the build server while attempting to publish your application.
Please check the Mac Server Log for details.

BR,
Szilárd Széll
Comment 1 Ram Chandra 2014-03-13 12:59:40 UTC
I have checked this issue and I am able to reproduce this issue.

Steps to reproduce:

1. Create an "iPhone Single view Application" on Visual Studio 2013.
2. Open property of project.
3. Navigate to "iOS IPA option".
4. Check the option "Build ad-hoc/enterprise package (IPA)".
5. Under Build menu click  "Build Adhoc IPA" option.

I observe that when we click on "Build Adhoc IPA", we get an exception message i.e. "Remote Build Error while Building Adhoc IPA (Generic)
A build error occured on the build server while attempting to create an IPA for your application.
Please check the Mac Server Log for details."

screencast: http://www.screencast.com/t/NbBpoBPm8uX9

Environment

Windows OS
Visual Studio 2013
Xamarin.iOS : 1.10.47(3d6a125d)
Comment 2 Szilárd Széll 2014-03-14 06:20:06 UTC
Dear Xamarin team,

Do you have an ETA for this huge blocking bug or at least a workaround?

We really have to ship some demos for our clients and now I can't do anything to achieve this.

Regards,
Szilárd
Comment 3 Brendan Zagaeski (Xamarin Team, assistant) 2014-03-18 11:54:22 UTC
I believe this is a duplicate of bug #16867.

The problem is that building an Ad-Hoc IPA currently requires that the project already be built locally (by the Visual Studio C# compiler) before starting the Adhoc build. So to work around this problem:

1. Build the project using "Build -> Build $(MSBuildProjectName)".

2. Build the IPA using "Build -> Build Adhoc IPA".
Comment 4 Szilárd Széll 2014-03-18 13:22:45 UTC
We always build the IPA as advised:
1. Clean
2. Rebuild
3. Build AdHoc IPA

So the workaround is not working.

(We copied the solution to the mac machine and it compiled the IPA, but we use tfs which is not available on the mac, so we really need the visual studio integration)
Comment 5 Brendan Zagaeski (Xamarin Team, assistant) 2014-03-18 13:38:19 UTC
Interesting. This sounds like a different problem then (and also different from Comment 1).

The "The remote server returned an error: (500)" error can result from any of a number of different problems on the Mac build host.


The three logs to check for more information are:

In Visual Studio:
1. The "Output -> Mac Server Log" window

On the Mac build host:
> 2. ~/Library/Logs/Xamarin/MonoTouchVS/$(MSBuildProjectName)_{project-guid}.log

... and:

> 3. ~/Library/Logs/Xamarin/MonoTouchVS/mtbserver.log

If these logs don't point to a clear explanation of the problem [1], you can attach them back to this bug report.


[1] For example, mismatches of the provisioning profile and the bundle identifier is a common problem.

Thanks!
Comment 6 Szilárd Széll 2014-03-20 07:38:28 UTC
We managed to build the IPA after all.
The logs give the answer, and it was the thing you suspected, we had a mismatch with the provisioning profile.

[19-Mar-2014 17:55:06] Error: No iOS code signing key matches specified provisioning profile 'XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX'.
[19-Mar-2014 17:55:06] 	Provisioning profile: "XXX" (XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX)
[19-Mar-2014 17:55:06] Command [Build: CommmandUrl=Build] finished (11)

But there was a weird thing. We had two certificates for our company with the same name, but different expiration days. We could build the IPA after we revoked one of them. Maybe this confused xamarin?

It would be good by the way, if the mac server log in visual studio should contain the information about the provisioning profile mismatch. If we could see that we didn't even create this bug report.

Thanks for you help!
Comment 7 Jose Miguel Torres 2014-07-19 06:26:01 UTC
We are working in order to improve the Xamarin Build Host log verbosity that will be release with future releases. Thanks for your feedback...