Bug 27747 - Clean does not clean ios projects
Summary: Clean does not clean ios projects
Alias: None
Product: iOS
Classification: Xamarin
Component: MSBuild ()
Version: XI 8.6.0
Hardware: Macintosh Mac OS
: Normal normal
Target Milestone: Untriaged
Assignee: Bugzilla
Depends on:
Reported: 2015-03-07 06:49 UTC by Andrew Page
Modified: 2016-10-19 11:55 UTC (History)
5 users (show)

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:

Description Andrew Page 2015-03-07 06:49:14 UTC
Description of Problem:

Running 'clean' does not remove all build obj products.   

5kiMac:JSONProxy andrew$ cd iosUnitTests/
5kiMac:iosUnitTests andrew$ du -khs bin
 98M	bin
5kiMac:iosUnitTests andrew$ du -khs obj
314M	obj
5kiMac:iosUnitTests andrew$ du -khs bin
 74M	bin
5kiMac:iosUnitTests andrew$ du -khs obj
314M	obj

Steps to reproduce the problem:
1. Create a Xamarin forms project
2. populate with code
3. build, debug, repeat
4. check size of project directory, specfically obj/bin directories
5. select 'Clean' or 'Clean All' from build menu
6. recheck size of project

Actual Results:

obj directory still populated with build products

Expected Results:

obj directory removed or at least emptied of compiler outputs

How often does this happen? 

every time

Additional Information:

simple work around is to remove the directories manually from a command line or finder

I may be 'old school' in my thinking of what constitutes 'clean', however this makes archiving of projects for backup, sharing or bug reporting more difficult.
Comment 1 Andrew Page 2015-03-07 06:54:20 UTC
The Android component of the Forms project is cleaned as expected though
Comment 2 Jeffrey Stedfast 2015-03-09 12:51:20 UTC
I can't seem to reproduce this...

if I do Build -> Clean, it cleans the obj and bin directories completely for me.
Comment 3 Jeffrey Stedfast 2015-03-09 12:58:46 UTC
The only thing I can think of is that your build configuration is set to something that disables the iOS project and so skips over cleaning the iOS project.
Comment 4 Sebastien Pouliot 2016-05-26 21:42:01 UTC
We have not reproduce the issue. If you are still experiencing this issue please provide all the requested information and re-open the bug report. Thanks!
Comment 5 Momm 2016-10-19 11:55:02 UTC
I'm able to reproduce it in several projects. For Android it works fine, but iOS doesn't remove the files.

I noticed this behavior when my macOS (El Capitan) run out of space.

As for Xamarin Studio, I'm using the latest version:
Xamarin Studio Community
Version 6.1.1 (build 15)
Installation UUID: 7153e606-d18f-4e88-837e-5aea6e94064c
	Mono 4.6.1 (mono-4.6.0-branch-c8sr0/ef43c15) (64-bit)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 406010005