Bug 20108

Summary: System.IO.FileNotFoundException: Could not load assembly 'System.ServiceModel.Security, Version=3.9.0.0, Culture=
Product: Android Reporter: Anuj Bhatia <anuj.bhatia>
Component: BCL Class LibrariesAssignee: Greg Munn <gregm>
Status: RESOLVED FIXED    
Severity: normal CC: masafa, mono-bugs+monodroid, mono-bugs+mono, mono-bugs+runtime, saurabhd
Priority: ---    
Version: 4.16.0   
Target Milestone: ---   
Hardware: PC   
OS: Mac OS   
Tags: Is this bug a regression?: ---
Last known good build:
Attachments: IsolatedPCLTest

Description Anuj Bhatia 2014-05-28 19:30:30 UTC
Created attachment 6901 [details]
IsolatedPCLTest

[Reproduction Attached]

Error:

/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets: Error: Exception while loading assemblies: System.IO.FileNotFoundException: Could not load assembly 'System.ServiceModel.Security, Version=3.9.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. Perhaps it doesn't exist in the Mono for Android profile?
File name: 'System.ServiceModel.Security.dll'
  at Xamarin.Android.Tuner.DirectoryAssemblyResolver.Resolve (Mono.Cecil.AssemblyNameReference reference, Mono.Cecil.ReaderParameters parameters) [0x00000] in <filename unknown>:0 
  at Xamarin.Android.Tuner.DirectoryAssemblyResolver.Resolve (Mono.Cecil.AssemblyNameReference reference) [0x00000] in <filename unknown>:0 
  at Xamarin.Android.Tasks.ResolveAssemblies.AddAssemblyReferences (System.Collections.Generic.List`1 assemblies, Mono.Cecil.AssemblyDefinition assembly, Boolean topLevel) [0x00000] in <filename unknown>:0 
  at Xamarin.Android.Tasks.ResolveAssemblies.Execute () [0x00000] in <filename unknown>:0  (AndroidApp)


Version Information:

=== Xamarin Studio ===

Version 5.1 (build 244)
Installation UUID: 9a5bd0f9-4994-43f4-8258-e3bb75542e4d
Runtime:
	Mono 3.4.0 ((no/c3fc3ba)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 304000204

=== Apple Developer Tools ===

Xcode 5.1.1 (5085)
Build 5B1008

=== Xamarin.Mac ===

Xamarin.Mac: Not Installed

=== Xamarin.iOS ===

Version: 7.2.3.39 (Enterprise Edition)
Hash: fc6f56b
Branch: 
Build date: 2014-05-19 19:10:29-0400

=== Xamarin.Android ===

Version: 4.12.4 (Enterprise Edition)
Android SDK: /Users/abhatia/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)
		4.2   (API level 17)
		4.4   (API level 19)
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)

=== Build Information ===

Release ID: 501000244
Git revision: 81853d05639738e34dce61d85e8af5252e9bb881
Build date: 2014-05-28 11:27:41-04
Xamarin addins: 70e54522e9eac3e7593de9d75bd6e08c08be6270

=== Operating System ===

Mac OS X 10.9.0
Darwin ABMacBookPro-2.local 13.0.2 Darwin Kernel Version 13.0.2
    Sun Sep 29 19:38:57 PDT 2013
    root:xnu-2422.75.4~1/RELEASE_X86_64 x86_64
Comment 1 Marek Safar 2014-05-29 03:50:59 UTC
Fixed in master
Comment 2 Saurabh 2014-08-05 08:57:53 UTC
I have checked this issue with following builds and I am still getting same behavior for attached project when building it. This is the build output for the same: https://gist.github.com/saurabh360/1669a60ba678ec712cf4 

=== Xamarin Studio ===

Version 5.3 (build 412)
Installation UUID: 2591d519-875d-4afe-a3d9-5fcf391bbd2d
Runtime:
	Mono 3.8.0 ((no/9ffca33)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 308000002

=== Xamarin.Android ===

Version: 4.16.0 (Business Edition)
Android SDK: /Users/nischal/Desktop/android-sdk-macosx
	Supported Android versions:
		2.1    (API level 7)
		2.2    (API level 8)
		2.3    (API level 10)
		3.1    (API level 12)
		3.2    (API level 13)
		4.0    (API level 14)
		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)
		4.5    (API level 21)
Java SDK: /usr
java version "1.6.0_35"
Java(TM) SE Runtime Environment (build 1.6.0_35-b10-428-11M3811)
Java HotSpot(TM) 64-Bit Server VM (build 20.10-b01-428, mixed mode)

=== Apple Developer Tools ===

Xcode 4.6.3 (2068)
Build 4H1503

=== Xamarin.iOS ===

Version: 7.2.6.28 (Business Edition)
Hash: 606f31a
Branch: 
Build date: 2014-08-01 15:27:48-0400

=== Xamarin.Mac ===

Version: 1.10.0.4 (Business Edition)

=== Build Information ===

Release ID: 503000412
Git revision: 77e042831804079a649ee83092ed36c7c10773a2
Build date: 2014-08-01 06:32:22-04
Xamarin addins: 57e379e6a9454a1c0d97aa3f770e7ae7cc16c522

=== Operating System ===

Mac OS X 10.7.4
Darwin nischals-Mac-mini.local 11.4.0 Darwin Kernel Version 11.4.0
    Mon Apr  9 19:32:15 PDT 2012
    root:xnu-1699.26.8~1/RELEASE_X86_64 x86_64
Comment 3 Marek Safar 2014-08-06 02:43:56 UTC
XS seems to have hardcoded Facades list (no idea why). This needs to be updated as well.