Bug 21474 - iOS build fails with MT1009:Could not copy the assembly error
Summary: iOS build fails with MT1009:Could not copy the assembly error
Status: RESOLVED FIXED
Alias: None
Product: iOS
Classification: Xamarin
Component: General ()
Version: 7.2.6
Hardware: PC Mac OS
: Normal normal
Target Milestone: 7.2.6
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2014-07-21 10:50 UTC by Prashant Cholachagudda
Modified: 2014-07-22 13:16 UTC (History)
4 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED FIXED

Description Prashant Cholachagudda 2014-07-21 10:50:17 UTC
In a new Xamarin Forms Blank (Portable) project, I get errors in either Xamarin Studio on the Mac or VS. I'm using the current Beta channel builds on both.

Error 3 MT1009:Could not copy the assembly '/Developer/MonoTouch/usr/lib/mono/2.1/monotouch.dll' to '/Users/oren/Library/Caches/Xamarin/mtbs/builds/ZeroconfTestiOS/2cf5fa8c-4a53-4df2-bbb4-44003d8bf9cf/output/temp/mtouch-cache/Link/monotouch.dll': Access to the path "/Developer/MonoTouch/usr/lib/mono/2.1/monotouch.dll.mdb" or "/Users/oren/Library/Caches/Xamarin/mtbs/builds/ZeroconfTestiOS/2cf5fa8c-4a53-4df2-bbb4-44003d8bf9cf/output/temp/mtouch-cache/Link/monotouch.dll.mdb" is denied.
0 0

Version Information:
=== Xamarin Studio ===

Version 5.2 (build 379)
Installation UUID: 0cceceb7-e177-4ebd-8d9a-c2529169bfd0
Runtime:
Mono 3.6.0 ((no/c46cf0e)
GTK+ 2.24.23 (Raleigh theme)

Package version: 306000038

=== Apple Developer Tools ===

Xcode 5.1.1 (5085)
Build 5B1008

=== Xamarin.iOS ===

Version: 7.2.6.22 (Enterprise Edition)
Hash: b983743
Branch:
Build date: 2014-07-13 20:15:09-0400

=== Xamarin.Android ===

Version: 4.14.0 (Enterprise Edition)
Android SDK: /Users/oren/Library/Developer/Xamarin/android-sdk-mac_x86
Supported Android versions:
2.1 (API level 7)
2.2 (API level 8)
2.3 (API level 10)
3.1 (API level 12)
4.0 (API level 14)
4.0.3 (API level 15)
Java SDK: /usr
java version "1.6.0_65"
Java(TM) SE Runtime Environment (build 1.6.0_65-b14-462-11M4609)
Java HotSpot(TM) 64-Bit Server VM (build 20.65-b04-462, mixed mode)

=== Xamarin.Mac ===

Version: 1.8.1.4

=== Build Information ===

Release ID: 502000379
Git revision: e797f287ff084be87a252fec5fcc1c79c53bd422
Build date: 2014-07-15 03:41:44-04
Xamarin addins: e40cad220f133f3ced5a76d33649afee4d1358c1

=== Operating System ===

Mac OS X 10.9.4
Darwin thor.housenet.novotny.org 13.3.0 Darwin Kernel Version 13.3.0
Tue Jun 3 21:27:35 PDT 2014
root:xnu-2422.110.17~1/RELEASE_X86_64 x86_64
Comment 2 Oren Novotny 2014-07-21 11:49:36 UTC
This happens with a new Blank iOS project too on XS 5.2 as well, no Xamarin Forms required.

Run on simulator is fine; run on device fails. If I change the project options to link for the simulator it also fails.
Comment 3 Rolf Bjarne Kvinge [MSFT] 2014-07-22 06:57:01 UTC
Oren, can you check if executing this from a terminal fixes the problem:

    sudo chmod 0644 /Developer/MonoTouch/usr/lib/mono/2.1/monotouch.dll.mdb
Comment 4 Rolf Bjarne Kvinge [MSFT] 2014-07-22 07:30:24 UTC
I can reproduce it; it happens when the user who installed monotouch isn't the same as the user who uses it.
Comment 5 Oren Novotny 2014-07-22 07:53:42 UTC
Hi Rolf,

The chmod worked and I can build both on XS on the Mac and VS on the PC.

When I looked at the permissions on the file before I changed them, it did indeed look wrong. The user was "localadmin" and group was "wheel," and there were only user rights.

I must have originally installed Xamarin as localadmin; I currently use a different user and installed updates, including the latest beta, with that user acct as it's also an admin.

Why did it become an issue only now though? I never had any issues before. I assume a fix will make it into the next beta/stable?
Comment 6 Rolf Bjarne Kvinge [MSFT] 2014-07-22 11:38:27 UTC
This has already been fixed internally, but it will not get into the next stable release (7.2.6) since we're too close to the release. It should get into the next one though.

In the meantime the workaround from comment #3 can be used.

monotouch/master: 1b1117d2
Comment 7 Oren Novotny 2014-07-22 11:39:23 UTC
Okay, can this workaround be put somewhere more public, like the release notes website?
Comment 8 Rolf Bjarne Kvinge [MSFT] 2014-07-22 13:16:05 UTC
The release notes for 7.2.6 have been updated.