27

Every time I'm trying to deploy my project I'm getting the following error:

Compiling to native code /Developer/MonoTouch/usr/bin/mtouch -sdkroot "/Applications/Xcode.app/Contents/Developer" --cache "/Users/user/Desktop/Source/iOS/obj/iPhone/Release/mtouch-cache" --nomanifest --nosign -dev "/Users/user/Desktop/Source/iOS/bin/iPhone/Release/iOS.app" -r

...

-linksdkonly -sdk "7.1" -targetver "7.1" --abi=armv7 "/Users/user/Desktop/iOS/bin/iPhone/Release/iOS.exe" Xamarin.iOS 7.2.6 Business Edition using framework: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.1.sdk error MT1009: Could not copy the assembly '/Developer/MonoTouch/usr/lib/mono/2.1/monotouch.dll' to '/Users/user/Desktop/iOS/obj/iPhone/Release/mtouch-cache/Link/monotouch.dll': Access to the path "/Developer/MonoTouch/usr/lib/mono/2.1/monotouch.dll.mdb" or "/Users/user/Desktop/iOS/obj/iPhone/Release/mtouch-cache/Link/monotouch.dll.mdb" is denied.

I cleaned obj folder - no luck. I reastarted the mac - no luck. I tried to go to /Developer/MonoTouch/usr/lib/mono/2.1/monotouch.dll but wasn't able to access this folder - it says I have no right.

2 Answers 2

39

Update: Xamarin verified that issue exists and provided KB article on about it with fix. All you have to do to fix that is run this in terminal:

sudo chmod 0644 /Developer/MonoTouch/usr/lib/mono/2.1/monotouch.dll.mdb

Faced this problem on July 16, 2014. Found thread on Bugzilla about this issue. Unfortunately, the latest alpha build of XS I had still had this problem and, unfortunately, solution was different to what is described in the thread.

I had to run sudo chmod 777 /Developer/MonoTouch/usr/lib/mono/2.1/* to fix access rights. Fixing rights in your project's bin/debug/whatever folder doesn't help.

P.S. I know 777 is not the best choice in terms of permissions, but it's just a single Mono folder, so it's acceptable for me. P.P.S. So 0644 is the correct permission set ;)

Sign up to request clarification or add additional context in comments.

1 Comment

P.S. don't forget to upvote the question itself. Without it, there would be no answer
2

This did it for me:

sudo chmod 0644 /Developer/MonoTouch/usr/lib/mono/2.1/monotouch.dll.mdb

Source: http://kb.xamarin.com/customer/portal/articles/1649499-error-mt1009-could-not-copy-the-assembly

My current setup:

Xamarin Studio Version 5.2 (build 386)

Apple Developer Tools Xcode 5.1.1 (5085)

Xamarin.iOS Version: 7.2.6.28

Operating System Mac OS X 10.9.4

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.