I have just updated Xamarin to the latest Stable version 4.5.0.443 and now get a build error on my Xamarin.Android build. The error is as follows:
**2>C:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.Common.CurrentVersion.targets(3813,5): error MSB3027: Could not copy "obj\Debug\MyProject.dll" to "bin\Debug\MyProject.dll". Exceeded retry count of 10. Failed.
2>C:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.Common.CurrentVersion.targets(3813,5): error MSB3021: Unable to copy file "obj\Debug\MyProject.dll" to "bin\Debug\MyProject.dll". The process cannot access the file 'bin\Debug\MyProject.dll' because it is being used by another process.
**
The above is duplicated for each of the projects that Xamarin.Android depends upon.
There is nothing running on my machine that should be locking these files. Something inside Visual Studio appears to be at fault, because if I quit VS, and manually delete all \obj and \bin folders, I can then successfully do a Rebuild All.
My iOS project still builds fine.
The Android and iOS projects both built every time prior to the update.
Anyone else seeing anything like this? Anyone have any ideas how to begin debugging this?
Kind wishes ~ Patrick
Yes, this is a bug in the latest Stable version: https://bugzilla.xamarin.com/show_bug.cgi?id=56275
I think this is fixed now in the Stable Channel (except VS 2017): 15.2.2 Service Release: https://forums.xamarin.com/discussion/96095/stable-channel-except-vs-2017-15-2-2-service-release
Answers
Yes, this is a bug in the latest Stable version: https://bugzilla.xamarin.com/show_bug.cgi?id=56275
@Ljusnan Wow - at least I'm not alone. Very useful to know the problem is on VS2017 too. I was considering spending a couple of hours updating to that, to see if that fixed things.
Thank you for the extremely fast reply.
me, too!
@Ron999 This is now marked fixed in Bugzilla. Last time I checked for an update to Xamarin, it said my copy was up-to-date, so I am not sure how to get the fix. I am rather expecting it to come down the normal channel inside Visual Studio. Anyone know if this is what will happen and roughly when I might expect it to happen?
Hi Pat,
thanks for sharing the info. i don't know how they are going to update. i also saw if was marked as fixed.
I think this is fixed now in the Stable Channel (except VS 2017): 15.2.2 Service Release: https://forums.xamarin.com/discussion/96095/stable-channel-except-vs-2017-15-2-2-service-release