Error when building sln: Cannot copy "Xamarin.Forms.Core.dll" to bin

ScottNimrodScottNimrod ✭✭USMember ✭✭

I get all these timeouts when I attempt to build my solution:

Error Could not copy "C:\Users\my_user_name\Documents\Visual Studio 2015\Projects\my_solution\packages\Xamarin.Forms.\lib\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+MonoTouch10+Xamarin.iOS10\Xamarin.Forms.Core.dll" to "bin\Debug\Xamarin.Forms.Core.dll". Exceeded retry count of 10. Failed. my_project C:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.Common.CurrentVersion.targets 3962

Why am I getting these errors?



  • DKurkinDKurkin ✭✭ GBMember ✭✭
    edited December 2015

    Solution - try to delete Obj an Bin folders of the projects

  • MercifulGiraffeMercifulGiraffe ✭✭ USMember ✭✭

    This happens when you update Xamarin.Forms nuget package and then try to build.

    I fix this by closing VS, deleting the bin folders for the project, then reopen VS. It appears the VS holds the Xamarin.Forms.Core.dll open (maybe for Intellisense?) and doesn't realise that it needs to unload it before building. Closing VS makes it unload the dll.

  • EBatikEBatik ✭✭✭ NLMember ✭✭✭

    @MercifulGiraffe @DKurkin i did that and i still have the same error! Should i delete both debug and release files from bin?

  • MercifulGiraffeMercifulGiraffe ✭✭ USMember ✭✭

    @EBatik You need to delete all files in the obj and bin (debug and release folders) in all projects in the solution. Just close VS, clear out everything, and then restart and it should work. Its painful, but once you know what to delete its fairly quick.

Sign In or Register to comment.