Bug 2678 - MonoDevelop always re-runs MSBuild CoreCompile target
Summary: MonoDevelop always re-runs MSBuild CoreCompile target
Status: RESOLVED FIXED
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: Project Model ()
Version: Trunk
Hardware: PC Windows
: High major
Target Milestone: ---
Assignee: Mikayla Hutchinson [MSFT]
URL:
Depends on:
Blocks:
 
Reported: 2011-12-28 19:44 UTC by Mikayla Hutchinson [MSFT]
Modified: 2011-12-28 20:30 UTC (History)
1 user (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 or GitHub 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 FIXED

Description Mikayla Hutchinson [MSFT] 2011-12-28 19:44:46 UTC
MD always re-runs the MSBuild CoreCompile target when using MSBuild on Windows.

This is because of the MSBuild _ComputeNonExistentFileProperty target, which sets the CoreCompile target to depend on a nonexistent file "" if the following condition is true:
  ('$(BuildingInsideVisualStudio)' == 'true')
    and
    (
      ('$(BuildingProject)' == 'false')
      or
      ('$(UseHostCompilerIfAvailable)' == 'true')
    )

Apparently this is because of the VS in-process compiler.

See http://xheo.com/blog/troubleshooting-projects-rebuilding-every-time

This means that M4A projects always rebuild when deploying.
Comment 1 Mikayla Hutchinson [MSFT] 2011-12-28 19:54:33 UTC
It looks like we should force UseHostCompilerIfAvailable should be false, since we never have such a compiler anyway, and the MS C# common targets set it to true if it's not set.
Comment 2 Mikayla Hutchinson [MSFT] 2011-12-28 20:18:18 UTC
I guess you could argue that MD shouldn't be setting BuildingInsideVisualStudio = true since it's not strictly true, but I don't know what else that affects.
Comment 3 Mikayla Hutchinson [MSFT] 2011-12-28 20:29:56 UTC
Fixed in git master.