Bug 41037 - mmp can not link assemblies that are read only
Summary: mmp can not link assemblies that are read only
Alias: None
Product: Xamarin.Mac
Classification: Desktop
Component: mmp ()
Version: Master
Hardware: PC Mac OS
: High normal
Target Milestone: 2.10.0 (C8)
Assignee: Chris Hamons
Depends on:
Reported: 2016-05-11 20:07 UTC by Chris Hamons
Modified: 2016-06-09 18:25 UTC (History)
3 users (show)

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:

Description Chris Hamons 2016-05-11 20:07:44 UTC
Steps to reproduce:

- Create a XM lib
- Make it read only
-r--r--r--  1 donblas  staff  3584 May 11 14:59 /Users/donblas/Programming/Local/TestReadOnly/TestLib/bin/Debug/TestLib.dll
- Create a XM project. Reference said lib as a file reference.
- Build

/Users/donblas/Programming/Local/TestReadOnly/TestReadOnly/MMP: Error MM2001: Could not link assemblies. Reason: Access to the path "/Users/donblas/Programming/Local/TestReadOnly/TestLib/bin/Debug/TestLib.dll" or "/Users/donblas/Programming/Local/TestReadOnly/TestReadOnly/bin/Debug/TestReadOnly.app/Contents/MonoBundle/TestLib.dll" is denied. (MM2001) (TestReadOnly)
Comment 2 Rolf Bjarne Kvinge [MSFT] 2016-05-25 09:39:27 UTC
Why is the first copy done?
Comment 3 Chris Hamons 2016-05-25 20:44:08 UTC
The first copy was done in mmp with CopyAssemblies and the second in the linker. 

We just taught mmp to strip read only bits in two cases.

FWICT after testing, this does not affect XI, so no need to push to more common code.

Fixed in https://github.com/xamarin/xamarin-macios/commit/47dc0f26c9e7398151a62850f028662351fc3623
Comment 4 Rajneesh Kumar 2016-06-08 19:11:38 UTC
I have checked this issue with the following master build:

I observed that this issue has been fixed and working as expected. Now user can link assemblies that are read only.

Screencast: http://www.screencast.com/t/wfFv24p4l

I will Re-Verify this issue when fix will merged in C8.

Comment 5 Rajneesh Kumar 2016-06-09 18:25:04 UTC
This issue is working fine with the master build, so as per comment 4 I am closing this issue.