Bug 33814 - Error: Error executing task LinkAssemblies: Operation is not supported.
Summary: Error: Error executing task LinkAssemblies: Operation is not supported.
Status: CONFIRMED
Alias: None
Product: Android
Classification: Xamarin
Component: General (show other bugs)
Version: 5.1
Hardware: PC Mac OS
: --- normal
Target Milestone: ---
Assignee: Radek Doulik
URL:
Depends on:
Blocks:
 
Reported: 2015-09-09 02:45 UTC by Prashant Cholachagudda
Modified: 2016-01-13 10:24 UTC (History)
3 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 for Bug 33814 on Developer Community or GitHub if you have new information to add and do not yet see a matching new report.

If the latest results still closely match this report, you can use the original description:

  • Export the original title and description: Developer Community HTML or GitHub Markdown
  • Copy the title and description into the new report. Adjust them to be up-to-date if needed.
  • Add your new information.

In special cases on GitHub you might also want the comments: GitHub Markdown with public comments

Related Links:
Status:
CONFIRMED

Description Prashant Cholachagudda 2015-09-09 02:45:37 UTC
Building the test project (see private comment below) in Release mode fails with 

/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets: Error: Error executing task LinkAssemblies: Operation is not supported.

Full build log - https://gist.github.com/prashantvc/8b8b36ae4f0a756b9990

# Version information

=== Xamarin Studio ===

Version 5.9.5 (build 9)
Installation UUID: c31bcfaf-24df-4ad2-9b1d-f454cf44b977
Runtime:
Mono 4.0.3 ((detached/d6946b4)
GTK+ 2.24.23 (Raleigh theme)

Package version: 400030020

=== Apple Developer Tools ===

Xcode 6.3 (7569)
Build 6D570

=== Xamarin.iOS ===

Version: 8.10.4.46 (Business Edition)
Hash: 2c66d2f
Branch: master
Build date: 2015-08-04 13:52:25-0400

=== Xamarin.Mac ===

Not Installed

=== Xamarin.Android ===

Version: 5.1.5.3 (Business Edition)
Android SDK: /Users/sbarouline/Library/Developer/Xamarin/android-sdk-mac_x86
Supported Android versions:
4.0.3 (API level 15)
4.2 (API level 17)
4.4 (API level 19)
5.0 (API level 21)
Java SDK: /usr
java version "1.6.0_65"
Java(TM) SE Runtime Environment (build 1.6.0_65-b14-466.1-11M4716)
Java HotSpot(TM) 64-Bit Server VM (build 20.65-b04-466.1, mixed mode)

=== Xamarin Android Player ===

Not Installed

=== Build Information ===

Release ID: 509050009
Git revision: b99cb19a1d3b15d8980c4616f13f837457e5b292
Build date: 2015-07-28 02:01:44-04
Xamarin addins: d53d6eceb828422f3d4aff8547f2f6bab6c9ea58

=== Operating System ===

Mac OS X 10.10.2
Darwin 192-168-1-16.tpgi.com.au 14.1.0 Darwin Kernel Version 14.1.0
Thu Feb 26 19:26:47 PST 2015
root:xnu-2782.10.73~1/RELEASE_X86_64 x86_64
Comment 2 Jonathan Pryor 2015-09-09 07:53:18 UTC
Relevant stack trace:

> Error executing task LinkAssemblies: System.NotSupportedException: Specified method is not supported.
> at Mono.Linker.AnnotationStore.GetAction (Mono.Cecil.AssemblyDefinition assembly) in <filename unknown>:line 0
> at Mono.Tuner.RemoveSecurity.IsActiveFor (Mono.Cecil.AssemblyDefinition assembly) in <filename unknown>:line 0
> at Mono.Tuner.SubStepDispatcher.CategorizeSubStep (ISubStep substep, Mono.Cecil.AssemblyDefinition assembly) in <filename unknown>:line 0
> at Mono.Tuner.SubStepDispatcher.CategorizeSubSteps (Mono.Cecil.AssemblyDefinition assembly) in <filename unknown>:line 0
> at Mono.Tuner.SubStepDispatcher.BrowseAssemblies (IEnumerable`1 assemblies) in <filename unknown>:line 0
> at Mono.Tuner.SubStepDispatcher.Process (Mono.Linker.LinkContext context) in <filename unknown>:line 0
> at Mono.Linker.Pipeline.Process (Mono.Linker.LinkContext context) in <filename unknown>:line 0
> at MonoDroid.Tuner.Linker.Run (Mono.Linker.Pipeline pipeline, Mono.Linker.LinkContext context) in <filename unknown>:line 0
> at MonoDroid.Tuner.Linker.Process (MonoDroid.Tuner.LinkerOptions options, Mono.Linker.LinkContext& context) in <filename unknown>:line 0
> at Xamarin.Android.Tasks.LinkAssemblies.Execute () in <filename unknown>:line 0
> at Microsoft.Build.BuildEngine.TaskEngine.Execute () in <filename unknown>:line 0
> at Microsoft.Build.BuildEngine.BuildTask.Execute () in <filename unknown>:line 0
Comment 3 Radek Doulik 2015-09-15 16:16:14 UTC
So the issue here is that the project Volcanoes.Android is using linker custom preserve xml file WCF_Fix.xml, trying to preserve part of System.ServiceModel assembly, while the assembly is not referenced.

Workaround: reference System.ServiceModel.dll assembly in the project. Then the linker will be happy and the project will build OK.

I should look into how to sensibly report that issue from the linker.
Comment 4 Sadik Ali 2016-01-13 10:24:06 UTC
I have checked this issue with XS XamarinStudio-5.10.1.6_0b60eecdb531933734519c13257d16a780274aab.dmg and able to reproduce the issue.


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

IDE Logs: https://gist.github.com/Parmendrak/29d47dab28e7d3ab671e


Environment info: 
=== Xamarin Studio ===

Version 5.10.1 (build 6)
Installation UUID: 05cfbdd7-b4af-41cd-945a-9db8b054b749
Runtime:
	Mono 4.2.1 (explicit/6dd2d0d)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 402010102

=== Xamarin.Profiler ===

Not Installed

=== Xamarin.Android ===

Version: 6.0.0.34 (Enterprise Edition)
Android SDK: /Users/360_macmini/Desktop/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.3    (API level 18)
		4.4    (API level 19)
		4.4.87 (API level 20)
		5.0    (API level 21)
		5.1    (API level 22)
		6.0    (API level 23)

SDK Tools Version: 24.4
SDK Platform Tools Version: 23.0.1
SDK Build Tools Version: 23.0.1

Java SDK: /usr
java version "1.8.0_31"
Java(TM) SE Runtime Environment (build 1.8.0_31-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.31-b07, mixed mode)

=== Xamarin Android Player ===

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

=== Apple Developer Tools ===

Xcode 7.2 (9548)
Build 7C68

=== Xamarin.iOS ===

Version: 9.4.1.20 (Enterprise Edition)
Hash: 122b860
Branch: master
Build date: 2016-01-05 20:20:30-0500

=== Xamarin.Mac ===

Version: 2.4.1.5 (Enterprise Edition)

=== Build Information ===

Release ID: 510010006
Git revision: 0b60eecdb531933734519c13257d16a780274aab
Build date: 2015-12-04 20:28:20-05
Xamarin addins: 9876fd7c9837977178411ec7375b4352c0a0d6af
Build lane: monodevelop-lion-cycle6-baseline

=== Operating System ===

Mac OS X 10.10.5
Darwin ShrutiMac.local 14.5.0 Darwin Kernel Version 14.5.0
    Wed Jul 29 02:26:53 PDT 2015
    root:xnu-2782.40.9~1/RELEASE_X86_64 x86_64