Bug 54450 - _RegisterMdbFilesWithFileWrites does not register the proper .mdb files making parallel builds fail randomly
Summary: _RegisterMdbFilesWithFileWrites does not register the proper .mdb files makin...
Status: ASSIGNED
Alias: None
Product: Android
Classification: Xamarin
Component: MSBuild ()
Version: 7.1 (C9)
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: dean.ellis
URL:
Depends on:
Blocks:
 
Reported: 2017-04-04 14:23 UTC by Jerome Laban
Modified: 2017-04-18 10:23 UTC (History)
3 users (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 for Bug 54450 on Developer Community or GitHub if you have new information to add and do not yet see a matching new report.

If the latest results still closely match this report, you can use the original description:

  • Export the original title and description: Developer Community HTML or GitHub Markdown
  • Copy the title and description into the new report. Adjust them to be up-to-date if needed.
  • Add your new information.

In special cases on GitHub you might also want the comments: GitHub Markdown with public comments

Related Links:
Status:
ASSIGNED

Description Jerome Laban 2017-04-04 14:23:17 UTC
When building a Xamarin.Android project referenced by another project, the generated MDB files get deleted by the IncrementalClean target, making a build fail when run in parallel.

The target _RegisterMdbFilesWithFileWrites incorrectly registers mdb files for the IncrementalClean target, which get deleted.

The target should look for *.mdb files, not *.dll.mdb files, as follows: 

	<Target Name="_RegisterMdbFilesWithFileWrites" BeforeTargets="IncrementalClean">  
		<CreateItem Include="$(OutDir)*.mdb;$(MonoAndroidIntermediateAssemblyDir)*.mdb">  
			<Output TaskParameter="Include" ItemName="_FilesToRegister" />  
		</CreateItem>  
		<CreateItem Include="$([System.IO.Path]::GetFullPath('%(_FilesToRegister.Identity)'))"
				Condition="Exists('%(_FilesToRegister.Identity)')">  
			<Output TaskParameter="Include" ItemName="_CleanCurrentFileWrites" />  
		</CreateItem>
	</Target>
Comment 1 Preetham 2017-04-06 12:30:30 UTC
I believe I am running into a similar issue, but on a much larger scale, that is not letting me build or debug on visual studio. Please look at bug# 54467 for details!