Bug 58646 - _CleanGeneratedDebuggingFiles target removes ALL .pdbs
Summary: _CleanGeneratedDebuggingFiles target removes ALL .pdbs
Status: VERIFIED FIXED
Alias: None
Product: Android
Classification: Xamarin
Component: MSBuild ()
Version: 7.3 (15.2)
Hardware: PC Windows
: High normal
Target Milestone: 15.4
Assignee: dean.ellis
URL:
Depends on:
Blocks:
 
Reported: 2017-08-08 16:01 UTC by Grigory (Playtika)
Modified: 2017-09-29 08:56 UTC (History)
4 users (show)

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


Attachments
Sample (25.77 KB, application/x-zip-compressed)
2017-08-09 13:39 UTC, Grigory (Playtika)
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 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:
VERIFIED FIXED

Description Grigory (Playtika) 2017-08-08 16:01:22 UTC
It removes PDBs created by other (non-Xamarin) projects that build into same dir.

https://github.com/xamarin/xamarin-android/pull/517/commits - this PR introduced the issue.
Comment 1 Jon Douglas [MSFT] 2017-08-08 16:12:55 UTC
(In reply to Grigory (Playtika) from comment #0)
> It removes PDBs created by other (non-Xamarin) projects that build into same
> dir.
> 
> https://github.com/xamarin/xamarin-android/pull/517/commits - this PR
> introduced the issue.

Grigory, Thank you for your report. For me to CONFIRM this issue, do you have a small reproduction case that you can add to this bug report? This will help aid our investigation and issue a quick fix.

Thank you kindly
Comment 2 Grigory (Playtika) 2017-08-09 13:39:29 UTC
Created attachment 24100 [details]
Sample

Build PdbSample.Android project
PbdSample\Build\Bin\Debug\PdbSample.pdb was removed
Comment 3 Jon Douglas [MSFT] 2017-08-09 16:00:07 UTC
I can CONFIRM this behavior based on the reproduction in https://bugzilla.xamarin.com/show_bug.cgi?id=58646#c2

2>Target "_CleanGeneratedDebuggingFiles: (TargetId:93)" in file "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets" from project "C:\Users\dougl\Downloads\PdbSample\PdbSample.Android\PdbSample.Android.csproj" (target "_CleanMonoAndroidIntermediateDir" depends on it):
2>Added Item(s): _OutputDebugSymbolFiles=..\Build\Bin\Debug\PdbSample.pdb
2>Task "Delete" (TaskId:64)
2>  Task Parameter:Files=..\Build\Bin\Debug\PdbSample.pdb (TaskId:64)
2>  Deleting file "..\Build\Bin\Debug\PdbSample.pdb". (TaskId:64)
2>Done executing task "Delete". (TaskId:64)
2>Done building target "_CleanGeneratedDebuggingFiles" in project "PdbSample.Android.csproj".: (TargetId:93)

Source: https://github.com/xamarin/xamarin-android/blob/099ab6a0a87947331a5ade5de57d4ff29523df8d/src/Xamarin.Android.Build.Tasks/Xamarin.Android.Common.targets#L2424-L2429

Setting priority to HIGH due to the area affecting debugging with .pdb files.
Comment 4 dean.ellis 2017-08-11 13:02:24 UTC
PR is up https://github.com/xamarin/xamarin-android/pull/733
Comment 5 dean.ellis 2017-08-14 16:50:22 UTC
Fixed in Xamarin-android/master/4bb7ebdb