Bug 31930 - Can no longer create custom output path
Summary: Can no longer create custom output path
Status: RESOLVED ANSWERED
Alias: None
Product: Visual Studio Extensions
Classification: Xamarin
Component: iOS ()
Version: 3.11 (C5)
Hardware: PC Mac OS
: --- normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2015-07-14 11:48 UTC by Cody Beyer (MSFT)
Modified: 2015-07-15 22:02 UTC (History)
7 users (show)

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


Attachments
Modified _CreateIpa Target for alternate option (3.54 KB, text/plain)
2015-07-15 16:46 UTC, Brendan Zagaeski (Xamarin Team, assistant)
Details


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 ANSWERED

Comment 1 Cody Beyer (MSFT) 2015-07-15 13:08:33 UTC
### Versions

8.10.0.303 Not Working
8.10.1.64 Not Working
8.10.1.74 Not Working
8.10.2.37 Not Working
8.10.0.267 Working
Comment 2 Brendan Zagaeski (Xamarin Team, assistant) 2015-07-15 16:46:50 UTC
Created attachment 12049 [details]
Modified _CreateIpa Target for alternate option

This "use at your own risk" "trick" of using an absolute path in the "IpaPackageName" property broke when the `_CreateIpa` MSBuild Target was updated to fix the "iTunesMetadata.plist" issue [1].

> [1] https://forums.xamarin.com/discussion/40388/disallowed-paths-itunesmetadata-plist-found-at-when-submitting-to-app-store/p1


Fortunately MSBuild provides flexibility to achieve the same result in several different ways, arguably even more cleanly than before.




## One simple option: move the IPA file after it is created

I've created a new KB article for this technique here:

https://kb.xamarin.com/customer/portal/articles/2061038-can-i-change-the-output-path-of-the-ipa-file-




## Alternate option: override the `_CreateIpa` Target with a custom version

If you require that the `.ipa` file never be written to the "$(OutputPath)" folder, you could achieve that by copying the `_CreateIpa` Target into the bottom of your iOS app's `.csproj` file and then modifying the `Zip` Task's `OutputFile` argument. For example, you could again add a custom `IpaOutputPath` property (as discussed in the KB article):

> OutputFile="$(OutputPath)$(IpaPackageName)"

To:
> OutputFile="$(IpaOutputPath)$(IpaPackageName)"


(See the attached file for the full text of the modified `_CreateIpa` Target.)
Comment 3 Brendan Zagaeski (Xamarin Team, assistant) 2015-07-15 22:02:19 UTC
I have now removed the old outdated KB article.