1

I'm creating cross platform app and every time I tried to deploy the app to my android mobile, I'm getting this error. Each time I have to clean build the solution before deploying it. What is the error that causing this problem.

Severity Code Description Project File Line Suppression State Error The "LinkAssemblies" task failed unexpectedly. System.IO.IOException: The process cannot access the file 'C:\Users\User\Documents\Visual Studio 2015\Projects\Camera\Camera\Camera.Droid\obj\Debug\linkdst\Camera.Droid.dll' because it is being used by another process. at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost) at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access) at Xamarin.Android.Tools.Files.HashFile(String filename, HashAlgorithm hashAlg) at Xamarin.Android.Tools.Files.HashFile(String filename) at Xamarin.Android.Tools.Files.HasFileChanged(String source, String destination) at Xamarin.Android.Tools.Files.CopyIfChanged(String source, String destination) at Xamarin.Android.Tasks.MonoAndroidHelper.CopyIfChanged(String source, String destination) at Xamarin.Android.Tasks.LinkAssemblies.Execute() at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build. BackEnd.ITaskExecution Host.Execute() at Microsoft.Build.BackEnd.TaskBuilder. d__26.MoveNext() Camera.Droid

Romano Zumbé
  • 7,893
  • 4
  • 33
  • 55
jdk
  • 139
  • 2
  • 12

2 Answers2

0

This seems like the known bug that a lot of developers experienced.

Make sure you have updated Xamarin to all the latest bits, it should resolve automatically then.

Gerald Versluis
  • 30,492
  • 6
  • 73
  • 100
0

Try these:

1.Update Xamarin Forms package to 2.5.0.91635. 2.Update all Android Packages to 25.4.0.2. 3.Restart Visual Studio. 4.Delete Bin & Obj folders in Portable & Android.

This worked for me.

Manasa
  • 120
  • 6