Bug 30241

Summary: Frequent build errors due to iTunesMetadata.plist
Product: Visual Studio Extensions Reporter: Jason Smith [MSFT] <jas>
Component: iOSAssignee: Bugzilla <bugzilla>
Severity: normal CC: brendan.zagaeski, joe, kzu, mono-bugs+bugzilla, peter.collins
Priority: ---    
Version: 4.0.0 (C6)   
Target Milestone: ---   
Hardware: PC   
OS: Windows   
Tags: Is this bug a regression?: ---
Last known good build:
Attachments: Diagnostic build output

Description Jason Smith [MSFT] 2015-05-19 16:11:56 UTC

Happens every other build or so. Check out the Xamarin.Forms source to repro.
Comment 2 Brendan Zagaeski (Xamarin Team, assistant) 2015-05-19 19:20:21 UTC
Created attachment 11249 [details]
Diagnostic build output

## Steps to reproduce 100% of the time with any Unified API iOS app project on either Mac or Windows

1. Ensure the current configuration has the `BuildIpa` property set to `true` in the `.csproj` (add it to the configuration if needed).

2. Build the app once. It will successfully create the `.ipa`.

3. Add a "junk" line like `var foo = 10` to any of the `.cs` files, or change a value in the `Info.plist` like the "Build" number.

4. Build the app again. (Do not clean the project before building.)

## Result

The "Move" task fails when running the "_CreateIpa" target during the second build in step 4.

> Task "Move"
>         Using task Move from Xamarin.MacDev.Tasks.Move, Xamarin.MacDev.Tasks, Version=1.0.5612.15789, Culture=neutral, PublicKeyToken=null
> /Library/Frameworks/Mono.framework/External/xbuild/Xamarin/iOS/Xamarin.iOS.Common.targets: error : Failed to move 'obj/iPhone/Release/ipa/Payload/UnifiedSingleViewIphone1.app/iTunesMetadata.plist' to 'obj/iPhone/Release/ipa/iTunesMetadata.plist': Win32 IO returned ERROR_ALREADY_EXISTS. Path: 
> Task "Move" execution -- FAILED

## Manual workaround

Delete the conflicting destination file `obj/iPhone/Release/ipa/iTunesMetadata.plist` and repeat step 4.
Comment 3 Peter Collins 2015-05-26 13:02:52 UTC

*** This bug has been marked as a duplicate of bug 29989 ***