Bug 24416 - Building "Ad-Hoc" configuration from command line does not copy IPA file to Windows
Summary: Building "Ad-Hoc" configuration from command line does not copy IPA file to W...
Status: VERIFIED FIXED
Alias: None
Product: Visual Studio Extensions
Classification: Xamarin
Component: iOS (show other bugs)
Version: 3.7
Hardware: PC Windows
: Low normal
Target Milestone: 3.11.1 (C5SR1)
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2014-11-10 18:59 UTC by Brendan Zagaeski (Xamarin Team, assistant)
Modified: 2015-04-28 00:56 UTC (History)
11 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:
VERIFIED FIXED

Description Brendan Zagaeski (Xamarin Team, assistant) 2014-11-10 18:59:33 UTC
Building the "Ad-Hoc" configuration from the command line does not copy the IPA file to Windows.

The Visual Studio IDE build process has recently added a nice feature where it will copy the final IPA from the Mac build host back over to the Windows side. Command line builds for Xamarin.iOS have also recently been simplified and improved quite nicely. This bug is just to tidy up a loose end with getting the IPA files copied from the Mac build host when building from the command line.


## Steps to reproduce

1. Create a new "Visual C# -> iOS -> Classic API -> iPhone -> Single View App".

2. Ensure Visual Studio has successfully paired to the current build host so that the pairing data is cached.

3. Quit Visual Studio so that the build host will be available for use by a command line build.

4. Build the project from the command line in the "Ad-Hoc|iPhone" configuration:
> C:\Source\iPhoneApp1> msbuild /t:Build /p:Configuration=Ad-Hoc;Platform=iPhone iPhoneApp1.sln



## Results

The `.ipa` file is created successfully on the Mac build host, but it is not copied to the Windows side:

> C:\Source\iPhoneApp1> dir iPhoneApp1\bin\iPhone\Ad-Hoc\iPhoneApp1-1.0.ipa
...
> 11/10/2014  06:37 PM                 0 iPhoneApp1-1.0.ipa



## Expected results

The `.ipa` file is copied to the Windows side.

For example, if you build the project from the Visual Studio IDE, then the `.ipa` file *is* copied successfully to the Windows side:

> C:\Source\iPhoneApp1> dir iPhoneApp1\bin\iPhone\Ad-Hoc\iPhoneApp1-1.0.ipa
...
> 11/10/2014  06:45 PM         1,048,871 iPhoneApp1-1.0.ipa



## Version information


### Windows

Xamarin   3.7.248.0 (8ca7d11db8a6f874c6cd2de6d9ca0f511867ce91)
Xamarin.Android   4.18.1.3 (5474129af31e9d3a86cb7482c7c5c7a30ad315f1)
Xamarin.iOS   8.4.0.0 (209abebbd8f1a292d042420edb45fa5fbd3f017b)

Microsoft Visual Studio Professional 2013
Version 12.0.30723.00 Update 3
Microsoft .NET Framework
Version 4.5.51641


### Mac build host
Xamarin.iOS 8.4.0.15
Hash: 08968c4
Build date: 2014-10-20 21:48:06-0400

Mono 3.10.0 (detached/e204655)
Xcode 6.0.1 (6528), Build 6A317
Mac OS X 10.9.5
Comment 1 Brendan Zagaeski (Xamarin Team, assistant) 2014-11-10 19:23:23 UTC
This bug breaks the new IPA copying feature with the same symptoms as bug 24417, but the two issues might have different underlying causes.
Comment 2 Kent Green [MSFT] 2015-01-16 13:10:08 UTC
Adding the following bug to the "See Also" section as a possibly related issue:

Bug 25409 - Build IPA with msbuild from the command line fails since _RemoteBuild target has been removed
Comment 4 Brendan Zagaeski (Xamarin Team, assistant) 2015-02-05 14:17:58 UTC
I'm removing the link to the Bug 25409 (added with comment 2) because upon further investigation of bug 25409, I doubt the 2 issues are directly related. Bug 25409 is _not_ specific to Ad-Hoc builds. This bug is.
Comment 5 Saurabh 2015-02-16 02:37:35 UTC
I have checked this Issue with latest builds. Bu I am not able to reproduce this Issue. I am getting .ipa file on windows under project directory when build project using command tool. This is the screencast for the same:http://www.screencast.com/t/pEJw19uBTYgy

Command line Tool Output: https://gist.github.com/saurabh360/0fd1210fa09b9db74098

Please let me know have I missed anything here to reproduce this Issue?

Build which I have used:
Xamarin.iOS 8.6.2.19 

Microsoft Visual Studio Professional 2013
Version 12.0.31101.00 Update 4
Microsoft .NET Framework
Version 4.5.51641

Installed Version: Professional

LightSwitch for Visual Studio 2013   06177-004-0446016-02238
Microsoft LightSwitch for Visual Studio 2013

Team Explorer for Visual Studio 2013   06177-004-0446016-02238
Microsoft Team Explorer for Visual Studio 2013

Visual Basic 2013   06177-004-0446016-02238
Microsoft Visual Basic 2013

Visual C# 2013   06177-004-0446016-02238
Microsoft Visual C# 2013

Visual C++ 2013   06177-004-0446016-02238
Microsoft Visual C++ 2013

Visual F# 2013   06177-004-0446016-02238
Microsoft Visual F# 2013

Visual Studio 2013 Code Analysis Spell Checker   06177-004-0446016-02238
Microsoft® Visual Studio® 2013 Code Analysis Spell Checker

Portions of International CorrectSpell™ spelling correction system © 1993 by Lernout & Hauspie Speech Products N.V. All rights reserved.

The American Heritage® Dictionary of the English Language, Third Edition Copyright © 1992 Houghton Mifflin Company. Electronic version licensed from Lernout & Hauspie Speech Products N.V. All rights reserved.

Windows Phone SDK 8.0 - ENU   06177-004-0446016-02238
Windows Phone SDK 8.0 - ENU

Application Insights Tools for Visual Studio Package   1.0
Application Insights Tools for Visual Studio

ASP.NET and Web Tools   12.4.51016.0
Microsoft Web Developer Tools contains the following components:
Support for creating and opening ASP.NET web projects
Browser Link: A communication channel between Visual Studio and browsers
Editor extensions for HTML, CSS, and JavaScript
Page Inspector: Inspection tool for ASP.NET web projects
Scaffolding: A framework for building and running code generators
Server Explorer extensions for Microsoft Azure Websites
Web publishing: Extensions for publishing ASP.NET web projects to hosting providers, on-premises servers, or Microsoft Azure

ASP.NET Web Frameworks and Tools 2012.2   4.1.21001.0
For additional information, visit http://go.microsoft.com/fwlink/?LinkID=309563

ASP.NET Web Frameworks and Tools 2013   5.2.21010.0
For additional information, visit http://www.asp.net/

Common Azure Tools   1.3
Provides common services for use by Azure Mobile Services and Microsoft Azure Tools.

Microsoft Azure Mobile Services Tools   1.3
Microsoft Azure Mobile Services Tools

NuGet Package Manager   2.8.50926.663
NuGet Package Manager in Visual Studio. For more information about NuGet, visit http://docs.nuget.org/.

Office Developer Tools for Visual Studio 2013 ENU   12.0.30626
Microsoft Office Developer Tools for Visual Studio 2013 ENU

PowerShell Tools   1.3
Provides file classification services using PowerShell

PreEmptive Analytics Visualizer   1.2
Microsoft Visual Studio extension to visualize aggregated summaries from the PreEmptive Analytics product.

SQL Server Data Tools   12.0.41012.0
Microsoft SQL Server Data Tools

Windows Phone 8.1 SDK Integration   1.0
This package integrates the tools for the Windows Phone 8.1 SDK into the menus and controls of Visual Studio.

Workflow Manager Tools 1.0   1.0
This package contains the necessary Visual Studio integration components for Workflow Manager.

Xamarin   3.9.325.0 (96e7814)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.

Xamarin.Android   4.20.0.34 (49a04b966feb40dfdba49d57ba16249b66d606a6)
Visual Studio plugin to enable development for Xamarin.Android.

Xamarin.iOS   8.6.2.0 (09ae75f83eafce1bdc3fa067f281cbdf1ca7b893)
Visual Studio extension to enable development for Xamarin.iOS.

Xamarin.iOS Unified Migration   1.0
Automated migration for Xamarin iOS Classic projects to Unified
Comment 6 Gabe 2015-03-20 13:50:55 UTC
Saurabh, thanks for taking the time to reproduce the bug and giving us a screen-cast demonstrating the issue.  

Ironically you seem to think you've demonstrated the build working as intended, but if you look at the file size of the resulting .ipa, you'll notice it's 0 bytes.  

I concede that your demo project might be small, but is it really that small?
Comment 7 John Miller [MSFT] 2015-03-27 09:53:22 UTC
Changing this to confirmed per Comment #6. The video in Comment #5 does indeed show that a 0KB IPA file is created.
Comment 8 ppatarinski@paylocity.com 2015-04-22 12:49:06 UTC
Any update on this? It has been close to a month...
Comment 9 Brendan Zagaeski (Xamarin Team, assistant) 2015-04-22 20:27:26 UTC
## Work around

Note that there are ways to work around this problem. The most straightforward way is probably to mount a shared network drive from the Windows computer on the Mac build host (or vice versa).

See the following 2 articles for some additional related information:

https://kb.xamarin.com/customer/portal/articles/1754718-is-there-a-way-to-copy-ipa-output-files-to-the-tfs-drop-folder-

https://kb.xamarin.com/customer/portal/articles/1733576-can-i-change-the-output-path-of-the-ipa-file-on-the-mac-build-host-

(If this link redirects to the top-level kb.xamarin.com/ page the first time
you click it, try clicking it once more.)



## Scheduling

Note that this problem is not a regression. The underlying problem in this case is in essence that a feature has not yet been implemented, so this bug report is effectively a feature request.

As alluded to in comment 0, it used to be true (until sometime around XamarinVS 3.5 or later, if I recall correctly) that the IPA file was _never_ copied over, not even when building from within Visual Studio. The new feature that copies the IPA file to the Windows machine automatically when building within Visual Studio has not yet been extended to enable copying the file over when building from the command line. I filed this bug to request that that feature be added.



The target milestone for this bug is currently set to "3.11.1", meaning that the developers currently hope to review this feature during the development process for that version. If the developers deem that it is within scope for the "3.11.1" release, and can fit it in alongside the other work that needs to happen for that release, then they will commence work on it in an effort to implement it for the "3.11.1" release.

"3.11.1" is the next "minor" release. The first Alpha/Beta releases for "3.11.1" are currently scheduled to be published a few weeks after the current "3.11" "major" release has moved from Alpha/Beta to Stable.
Comment 12 Saurabh 2015-04-28 00:56:31 UTC
I have checked this Issue with mentioned build in Comment#10 and observed that .ipa file is generated on Windows and now it's size is not 0 bytes.

C:\Users\Saurabh\Documents\Visual Studio 2013\Projects\App179\App1
79\bin\iPhone\Ad-Hoc

04/28/2015  10:08 AM         2,918,238 App179-1.0.ipa
               1 File(s)      2,918,238 bytes
               0 Dir(s)  377,555,935,232 bytes free

This is the terminal output for the same: https://gist.github.com/saurabh360/d81cc2540940635cf11e

Builds info:
XVS 3.11.474
X.iOS on build host 8.10.0.267