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.
Sharing violation while building a Xamarin.Forms.iOS project
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...
5 additional answers
Sort by: Most helpful
-
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-conteThe file should be on the Mac that builds the project.
To fix this you might have to downgrade your VS.
Regards
-
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.
-
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/1355811if 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
-
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.