Bug 35957 - F5 compiles executes the msbuild target "Build" twice
Summary: F5 compiles executes the msbuild target "Build" twice
Status: RESOLVED NOT_REPRODUCIBLE
Alias: None
Product: Visual Studio Extensions
Classification: Xamarin
Component: Android ()
Version: unspecified
Hardware: PC Windows
: Normal normal
Target Milestone: 4.3.1 (C9SR1)
Assignee: dean.ellis
URL:
Depends on:
Blocks:
 
Reported: 2015-11-17 16:31 UTC by Jerome Laban
Modified: 2016-12-29 16:55 UTC (History)
11 users (show)

Tags: BZCU
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 NOT_REPRODUCIBLE

Description Jerome Laban 2015-11-17 16:31:53 UTC
Using a default android project template, when selecting the diagnostics mode, when starting using F5 (launch with debugging), the csc compiler task (CoreCompile) is called twice.

The first time for the Build target, then a second time for the Install target (which depends on the Build target).

In a very large application, compiling twice makes csc, aapt, javac run twice which is very time consuming.
Comment 1 dean.ellis 2016-09-21 18:37:44 UTC
Hey Jerome

Can you get me some diagnostic output? you can replicate this by running

msbuild project.csproj /t:Build /v:d
msbuild project.csproj /t:Install /v:d

and capturing the output for each. This replicates what Vs will be doing calling "Build" then "Deploy". It should only be actually executing the targets which have changes detected. 

Note there was a Nuget bug earlier on this year where the .dll;s in the nuget packages folder would have dates in the future. This causes the entire build to run from scratch, I would have hoped it would have been fixed by now.

Dean
Comment 3 Jose Gallardo 2016-12-29 16:55:18 UTC
Hi Jerome,

I'm resolving this issue as Not_Reproducible.
If you do still facing it, please feel free to reopen it, and attach the diagnostic output as requested by @Dean in Comment 1.

Thanks