Could not write lines to file ? The process cannot access the file ?

PatrickLongPatrickLong Patrick LongUSMember ✭✭

"Could not write lines to file "obj\Debug\MvvmCross.Platform.csproj.FileListAbsolute.txt". The process cannot access the file 'C:\Projects\MVVMCross\MvvmCross\Platform\Platform\obj\Debug\MvvmCross.Platform.csproj.FileListAbsolute.txt' because it is being used by another process."

This looks like a bug that was first raised in 2015 and reported to be fixed in Xamarin 4.0. My build has been running for over 30 mins. Obviously it is not going to come back.

What is the solution for this?


  • ShantimohanElchuriShantimohanElchuri Shantimohan Elchuri USMember ✭✭✭✭

    Just close everything, wait 10 seconds and restart VS. Most of the time this resolves this issue. Files get locked by previous sessions and may be that thread is still active at OS level preventing the release of locks.

  • PatrickLongPatrickLong Patrick Long USMember ✭✭

    After a couple of restarts the problem has "gone away" (ridiculous), However after that the solution deployed successfully TWICE and after minimal code change I am now sitting waiting for the build to finish despite the following line as the last line in the Output window

    "Done building project "NativeToXF.csproj"."

    NativeToXF is the project I am deploying so I would expect it to be the final project to build.

Sign In or Register to comment.