Bug 52377 - Unable to clean iOS solution or build it because of RemoveDir error.
Summary: Unable to clean iOS solution or build it because of RemoveDir error.
Status: RESOLVED NOT_REPRODUCIBLE
Alias: None
Product: iOS
Classification: Xamarin
Component: MSBuild ()
Version: XI 10.3 (iOS 10.2)
Hardware: PC Windows
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2017-02-08 10:01 UTC by Patrick
Modified: 2017-03-08 12:29 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 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 NOT_REPRODUCIBLE

Description Patrick 2017-02-08 10:01:30 UTC
Hi,

I am unable to clean or build my iOS solution.  The clean gives the following error:

1>C:\Program Files (x86)\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets(342,3): error MSB4018: The "RemoveDir" task failed unexpectedly.
1>C:\Program Files (x86)\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets(342,3): error MSB4018: System.ObjectDisposedException: Cannot access a disposed object.
1>C:\Program Files (x86)\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets(342,3): error MSB4018: Object name: 'BuildClient'.

The build gives a similar error:

4>C:\Program Files (x86)\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets(342,3): error MSB4018: The "RemoveDir" task failed unexpectedly.
4>C:\Program Files (x86)\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets(342,3): error MSB4018: System.ObjectDisposedException: Cannot access a disposed object.
4>C:\Program Files (x86)\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets(342,3): error MSB4018: Object name: 'BuildClient'.
4>C:\Program Files (x86)\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets(342,3): error MSB4018:    at Xamarin.VisualStudio.Build.BuildClient.CheckDisposed() in C:\data\lanes

I updated Xamarin in Visual Studio to 4.2.2.11 two days ago and have been building fine.  This issue appears to have been caused by the fact that I manually deleted all \bin and \obj directories on the PC (not on the attached Mac).

On the Mac, I updated Xamarin Studio to 6.1.5 and iOS to 10.3.1.8 at the same time as the PC update, but, as I said, I have been building fine up to this point.


Kind wishes ~ Patrick
Comment 1 Patrick 2017-02-08 10:09:53 UTC
A restart of Visual Studio fixed this problem.

I'm happy for you to mark the bug fixed if you don't judge it to require further investigation.

- Patrick
Comment 2 Manuel de la Peña [MSFT] 2017-02-08 16:14:45 UTC
Might have been a strange state, will close and if you continue having the issue please feel free to reopen the bug.
Comment 3 Florian 2017-03-08 12:29:29 UTC
Same here. With Visual Studio 2017 and Xamarin.iOS 10.4. I didn't delete bin/obj folders.

However restarting Visual Studio helped.