Bug 52113

Summary: Error MT1009: Could not copy the assembly => mscorlib.dll.mdb" is denied. (MT1009)
Product: iOS Reporter: Andreas Klapperich <andreas>
Component: GeneralAssignee: Manuel de la Peña <manuel.delapena>
Status: VERIFIED FIXED    
Severity: critical CC: dheeraj.devadiga09, ivan.herrera, jimbobbennett, mohib.sheth, mohitk, mono-bugs+monotouch, paul.mace, rolf, sebastien, stephen.machwirth
Priority: ---    
Version: XI 10.4 (C9)   
Target Milestone: (C9)   
Hardware: Macintosh   
OS: Mac OS   
Tags: Is this bug a regression?: ---
Last known good build:
Attachments: Xamarin Studio Versioninformations

Description Andreas Klapperich 2017-01-31 18:42:41 UTC
Created attachment 19669 [details]
Xamarin Studio Versioninformations

After the Update 

Version 6.2 (build 1798)

I got the following error message

/Users/andreas/Documents/Development/github/Tausendblatt/iOS/MTOUCH: Error MT1009: Could not copy the assembly '/Library/Frameworks/Xamarin.iOS.framework/Versions/10.4.0.97/lib/mono/Xamarin.iOS/mscorlib.dll' to '/Users/andreas/Documents/Development/github/Tausendblatt/iOS/bin/iPhoneSimulator/Debug/Tausendblatt.iOS.app/mscorlib.dll': Access to the path "/Library/Frameworks/Xamarin.iOS.framework/Versions/10.4.0.97/lib/mono/Xamarin.iOS/mscorlib.dll.mdb" or "/Users/andreas/Documents/Development/github/Tausendblatt/iOS/bin/iPhoneSimulator/Debug/Tausendblatt.iOS.app/mscorlib.dll.mdb" is denied. (MT1009) (Tausendblatt.iOS)

After I used your workaround, I could run the program.

https://developer.xamarin.com/guides/ios/troubleshooting/questions/error-mt1009/

shell command: sudo chmod 0644 monotouch.dll.mdb (this was not enough)
shell command: sudo chmod 0644 *.dll.mdb (I need this)
Comment 1 Sebastien Pouliot 2017-02-01 02:32:44 UTC
@Manuel, that seems related to your change for mdbrebase - that was the only fix in this week refresh (10.4.9.97)
Comment 3 Mohib Sheth 2017-02-01 09:00:07 UTC
@Andreas Thanks for the workaround. I didn't realize that because I couldn't see the mdb files in the folder so I assumed they are missing.
Comment 4 Rolf Bjarne Kvinge [MSFT] 2017-02-01 10:40:06 UTC
The full workaround is:

> sudo chmod 0644 /Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mono/*/*.mdb
Comment 6 Rolf Bjarne Kvinge [MSFT] 2017-02-01 14:02:58 UTC
*** Bug 52180 has been marked as a duplicate of this bug. ***
Comment 7 Mohit Kheterpal 2017-02-01 15:38:39 UTC
I have tried to reproduce this issue with the template application of iOS but I am not sure about the exact steps to reproduce this issue.

I have create a template application and deploy it on device and then make some changes in the iOS app and then redeploy it on device without rebuild/cleaning it. But application deploy successfully on device.

It would be great if you provide some steps so that I can reproduce and verify it successfully.

Thanks
Comment 8 Ivan Herrera 2017-02-06 18:34:00 UTC
Wasn't able to reproduce. I think it is not safe to mark it as verified until there are more steps to reproduce it.
Comment 9 Rolf Bjarne Kvinge [MSFT] 2017-02-06 18:36:39 UTC
Try installing Xamarin.iOS with one user account, and then building with another, I think that should reproduce it.
Comment 10 Mohit Kheterpal 2017-02-07 13:36:59 UTC
Thanks @Rolf 
Today, I have tried to reproduce this issue by the steps given in comment 9 :
1. Install X.iOS build in User A
2. Create iOS Project in XS
3. Now login with User B on same machine 
4. Try to build same project created in user A

getting following error i.e. :
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/iOS/Xamarin.iOS.Common.targets: Error: Error executing task IBTool: Access to the path "obj/iPhoneSimulator/Debug/ibtool-manifests" is denied. (digicam222)

However if I drag the same project on desktop of User B and then try to build it then it build successfully.

**I am getting above behaviour with both X.iOS i.e. 10.4.0.97 and 10.4.0.114**

IDE Logs : https://gist.github.com/Mohit-Kheterpal/732ba89c1a7ad016e018c4af3c43a779

Environment info : 
https://gist.github.com/Mohit-Kheterpal/4ff251e77a2d9743b1212dc10920f059

Could you please let me know if I have to missed something to reproduce this issue
Comment 11 Ivan Herrera 2017-02-07 15:00:55 UTC
Same behavior here
Comment 12 Rolf Bjarne Kvinge [MSFT] 2017-02-07 15:20:41 UTC
@Mohit, try this:

1. Install XI using user A
2. Create new user B
3. Create & build new iOS project for user B.

if that won't reproduce the problem, please attach the output of this:

> ls -la /Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mono/*/*.mdb

and

> ls -la /path/to/project/directory
Comment 13 Mohit Kheterpal 2017-02-07 16:17:19 UTC
Yes, @Rolf Thanks

With steps mentioned in comment 12, I am able to reproduce this issue  with X.iOS 10.4.0.97 and also observed that this issue has been fixed with C9 X.iOS 10.4.0.114.

Hence, closing this issue by marking this as Verified.

thanks
Comment 14 Rolf Bjarne Kvinge [MSFT] 2017-02-14 09:37:59 UTC
*** Bug 52364 has been marked as a duplicate of this bug. ***