Sharing violation while building a Xamarin.Forms.iOS project

Shantimohan Elchuri 721 Reputation points
2021-05-28T18:10:46.947+00:00

After upgrading to VS2019 v16.10 I am having issue with building XF.iOS project. I am getting the following error:

Error MessagingRemoteException: An error occurred on client Build1610000228 while executing a reply for topic xvs/build/execute-task/<my_project_name>/2c07d71002fACTool
IOException: Sharing violation on path /Users/shantimohan/Library/Caches/Xamarin/mtbs/builds/<my_project_name>/2c07d71b54eeb7c0bcd8920433a7ab7c8b9abca4e6d8d70ece925ba74d3add9c/Assets.xcassets/AppIconSet7.appiconset/Contents.json

This is a previously running project. There is no such directory /Users/shantimohan.

What's the meaning of this error and how do I remedy it?

ThanQ...

Xamarin
Xamarin
A Microsoft open-source app platform for building Android and iOS apps with .NET and C#.
5,338 questions
{count} votes

Accepted answer
  1. Shantimohan Elchuri 721 Reputation points
    2021-06-16T13:18:59.047+00:00

    With the release of VS 16.10.2 this issue is resolved. Thanks to @Pascal Pereira for referring the VS feedback thread on this issue.

    0 comments No comments

5 additional answers

Sort by: Most helpful
  1. Flemming Juul 6 Reputation points
    2021-05-30T19:38:22.527+00:00

    Apparently there is a bug in VS2019, 16.10.0 - according to this post:
    https://stackoverflow.com/questions/66819741/xamarin-ios-wont-build-sharing-violation-on-path-for-asset-catalog-file-conte

    The file should be on the Mac that builds the project.

    To fix this you might have to downgrade your VS.

    Regards

    1 person found this answer helpful.
    0 comments No comments

  2. Vas A 1 Reputation point
    2021-06-01T12:10:24.957+00:00

    Manually creating the "mtbs\builds" folder in "users\<YOUR_USERNAME>\Library\Caches\Xamarin" on the Mac fixed it for me. I did not add the <PROJECT_NAME> sub-folder. This may not be pertinent but I also deployed to the simulator before deploying to the device.


  3. Pascal Pereira 36 Reputation points
    2021-06-03T13:01:00.313+00:00

    this is a bug in 16.10... please see
    https://developercommunity.visualstudio.com/t/xamarinforms-ios-ioexception-sharing-violation-on/1355811

    if you come across this, please click on the link above AND upvote this issue to get focus from MSFT. this is a blocking issue for many

    0 comments No comments

  4. Craig Robinson 1 Reputation point
    2021-06-10T17:47:41.133+00:00

    I rolled back to version VS 16.9.2 (Professional) and was able to get past this issue and create my distribution.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.