Bug 40958 - Inconsistency vs. other C# project types: "Copy if newer" setting causes iOS project to run build targets on every build attempt
Summary: Inconsistency vs. other C# project types: "Copy if newer" setting causes iOS ...
Status: RESOLVED ANSWERED
Alias: None
Product: Visual Studio Extensions
Classification: Xamarin
Component: iOS ()
Version: 4.1.0 (C7)
Hardware: PC Windows
: Normal minor
Target Milestone: Future Cycle
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2016-05-09 04:26 UTC by Brendan Zagaeski (Xamarin Team, assistant)
Modified: 2017-11-03 16:49 UTC (History)
4 users (show)

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


Attachments
Test case (18.15 KB, application/zip)
2016-05-09 04:26 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

Description Brendan Zagaeski (Xamarin Team, assistant) 2016-05-09 04:26:47 UTC
Created attachment 15940 [details]
Test case

Inconsistency vs. other C# project types: "Copy if newer" setting causes iOS project to run build targets on every build attempt




## Steps to replicate

1. Open the attached test case in Visual Studio. (Tested in Visual Studio 2015 Update 2.)

2. Ensure XamarinVS is connected to a Mac build host.

3. Build the "UnifiedSingleViewIphone1" project in the "Debug|iPhone" configuration.

4. Once the build completes, build the project again without cleaning (for example, select "Build > Build UnifiedSingleViewIphone1" from the menus).




## Results

The project builds again every time because the "copy to output file" is "missing":

> Project 'UnifiedSingleViewIphone1' is not up to date. Copy to output file 'C:\source\CopyIfNewerAlwaysBuilds\UnifiedSingleViewIphone1\bin\iPhone\Debug\text\TextFile1.txt' missing from output location.
> ------ Build started: Project: UnifiedSingleViewIphone1, Configuration: Debug iPhone ------



## Expected results

The "ConsoleApplication1" project in the attached test case demonstrates the expected behavior. The `TextFile1.txt` file is copied to the output location on the first build, and subsequent builds _skip_ the build targets entirely because the outputs are already up-to-date:

> ========== Build: 0 succeeded, 0 failed, 1 up-to-date, 0 skipped ==========



## Version info (brief)

Visual Studio 2015 Update 2
XamarinVS 4.1.0.462 (fb9e9f3)
Windows 10 (64-bit) 

Xamarin.iOS 9.8.0.294 (cycle7: 6950f7b)
Xcode 7.3, Build version 7D175
OS X 10.11.4
Comment 2 Pierce Boggan [MSFT] 2017-11-03 16:49:14 UTC
Hey Brendan!

I've moved this issue over to VSTS for further tracking:
https://devdiv.visualstudio.com/DevDiv/_workitems/edit/519634

If you're interested in continuing to follow the status of this issue, please click the 'Follow' button on the bug in VSTS. In the future, please feel free to file bugs via aka.ms/xvs-bug, which feeds into our new bug tracker in VSTS.

Thanks again for reporting this issue! <3

Pierce Boggan