Bug 44583 - Error executing task CreateDebugSettings Access to the path is denied with Bcl.Build package
Summary: Error executing task CreateDebugSettings Access to the path is denied with Bc...
Status: RESOLVED NOT_REPRODUCIBLE
Alias: None
Product: Tools
Classification: Mono
Component: msbuild ()
Version: 4.8.0 (C9)
Hardware: PC Mac OS
: Normal normal
Target Milestone: 15.3
Assignee: Ankit Jain
URL:
Depends on:
Blocks:
 
Reported: 2016-09-21 15:50 UTC by John Miller [MSFT]
Modified: 2017-03-23 20:45 UTC (History)
7 users (show)

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


Attachments
Diagnostic Build Output (648.21 KB, text/plain)
2016-09-21 15:51 UTC, John Miller [MSFT]
Details
Sample Project (29.16 KB, application/zip)
2016-09-21 15:52 UTC, John Miller [MSFT]
Details


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 GitHub or Developer Community 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 NOT_REPRODUCIBLE

Description John Miller [MSFT] 2016-09-21 15:50:23 UTC
**Overview:**

   After upgrading to XI 10, a build error occurs when using the Bcl.Build package.
   
**Steps to Reproduce:**

   1. Build the attach project in XS.    

**Actual Results:**

   > /Library/Frameworks/Mono.framework/External/xbuild/Xamarin/iOS/Xamarin.iOS.Common.targets: Error: Error executing task CreateDebugSettings: Access to the path is denied. (SettingsTest.iOS)
   
**Expected Results:**

   No Build errors.
   
**Build Date & Platform:**

   === Xamarin Studio Enterprise ===

Version 6.1 (build 5441)
Installation UUID: e01c3049-a2d2-4e0a-aad8-afe6fb627c4d
Runtime:
	Mono 4.6.0 (mono-4.6.0-branch/746756c) (64-bit)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 406000245

=== NuGet ===

Version: 3.4.3.0

=== Xamarin.Profiler ===

Not Installed

=== Xamarin.Android ===

Version: 7.0.0.18 (Xamarin Enterprise)
Android SDK: /Users/johnmiller/Library/Developer/Xamarin/android-sdk-macosx
	Supported Android versions:
		2.3   (API level 10)
		4.0.3 (API level 15)
		4.1   (API level 16)
		4.2   (API level 17)
		4.4   (API level 19)
		5.0   (API level 21)
		5.1   (API level 22)
		6.0   (API level 23)

SDK Tools Version: 25.1.7
SDK Platform Tools Version: 24.0.0
SDK Build Tools Version: 23.0.2

Java SDK: /usr
java version "1.8.0_60"
Java(TM) SE Runtime Environment (build 1.8.0_60-b27)
Java HotSpot(TM) 64-Bit Server VM (build 25.60-b23, mixed mode)

Android Designer EPL code available here:
https://github.com/xamarin/AndroidDesigner.EPL

=== Xamarin Android Player ===

Version: 0.6.5
Location: /Applications/Xamarin Android Player.app

=== Apple Developer Tools ===

Xcode 7.3 (10183.3)
Build 7D175

=== Xamarin.Mac ===

Version: 2.10.0.99 (Xamarin Enterprise)

=== Xamarin.iOS ===

Version: 10.0.0.6 (Xamarin Enterprise)
Hash: 6c3fee4
Branch: xcode8
Build date: 2016-09-09 13:01:32-0400

=== Build Information ===

Release ID: 601005441
Git revision: 68292d1ab289911c815ddc715dd7cc29a9752f9f
Build date: 2016-09-09 04:43:23-04
Xamarin addins: ed25d008672663eeb9db55f1ccecb3c24d2fd3b2
Build lane: monodevelop-lion-cycle8

=== Operating System ===

Mac OS X 10.11.2

=== Enabled user installed addins ===

Prism Template Pack 1.3
XamlStyler 1.0.1
   
**Additional Information:**

   This was not an issue in previous XS/XI versions. 
   It was discovered when a user has some files in source control which would make them read-only. It could be related to the Root.plist file too. It could also be similar to previous bugs where some files that are copied to the obj are not made writable (remove read-only). e.g. http://forums.xamarin.com/discussion/25489/copyandconvertresources-task-failed-unexpectedly-read-only-resources

   Attached is a diagnostic build log of the attached sample.
Comment 1 John Miller [MSFT] 2016-09-21 15:51:12 UTC
Created attachment 17644 [details]
Diagnostic Build Output
Comment 2 John Miller [MSFT] 2016-09-21 15:52:00 UTC
Created attachment 17645 [details]
Sample Project
Comment 3 Jimmy [MSFT] 2016-09-21 22:51:53 UTC
I did some testing and this error does _not_ occur with Mono 4.4.2.11, even with the other C8 bits installed.
Comment 4 Alex Soto [MSFT] 2016-09-22 13:48:31 UTC
I can also dupe this error using latest xamarin-macios/master @ 351bb29f0c56f688dd078be50b3b811ccb1c07ca
Comment 5 Sebastien Pouliot 2016-09-22 14:54:59 UTC
Sounds like a change in mono exposed this. Still if we copy a file the destination is "ours" and should be writable.
Comment 6 Jeffrey Stedfast 2016-09-26 19:00:45 UTC
Mono's xbuild Copy task seems to be duplicating file permissions from the source file.

There's an argument to be made on both sides of this, but given that there's no reason for output files to ever be read-only and that Mono broke behavior, I'd argue for punting this over to the Mono team.

It'll be ridiculous for us to have to chmod every file we may want to modify from any of the tasks before we try to open the file. That's just insane.
Comment 7 Ankit Jain 2016-11-01 20:08:52 UTC
Are you sure that the issue is in xbuild's Copy task? Last commit to that file was in Feb 2015. BTW, which file is this failing on?

Also, how do I reproduce this? I tried with latest from the Stable channel:

Mono 4.6.1 (mono-4.6.0-branch-c8sr0/ef43c15) (64-bit)
Xamarin.iOS Version: 10.2.0.4

.. but it builds fine from XS and from command line (`$ xbuild`).

Logs show the relevant target running successfully.

                        Target _CreateDebugSettings:
                                CreateDebugSettings Task
                                  AppBundleDir: bin/iPhoneSimulator/Debug/SettingsTest.iOS.app
                                  DebuggerPort: 10000
Comment 8 Luis Aguilera 2017-02-18 00:21:34 UTC
C9 is now closed. We'll move this bug to the next scheduled milestone, "15.1". We'll continue working on these issues, and will attempt to resolve them ASAP.
Comment 9 Ankit Jain 2017-03-21 18:04:32 UTC
@Alex, since you were able to reproduce this (https://bugzilla.xamarin.com/show_bug.cgi?id=44583#c4), could you please check if you can reproduce this with latest stable too?
Comment 10 Alex Soto [MSFT] 2017-03-23 20:43:53 UTC
@Ankit I cannot reproduce this issue anymore using latest xamarin/macios/master @ 272a5ef53e065944d1ca867753f685493a9ff687
Comment 11 Ankit Jain 2017-03-23 20:45:56 UTC
Closing this based on Alex's latest comment.