Internalize [ComImport] in MONOTOUCH profile since it can make the (unlinked) applica...
authorSebastien Pouliot <sebastien@xamarin.com>
Wed, 5 Oct 2011 01:14:15 +0000 (21:14 -0400)
committerSebastien Pouliot <sebastien@xamarin.com>
Wed, 5 Oct 2011 21:30:26 +0000 (17:30 -0400)
mcs/class/corlib/System.Runtime.InteropServices/ComImportAttribute.cs

index 572230419627828214bf28a9adbed38b5e33d211..7bf558ea9c356ab9f97a8bd2f41b5cefc47f94cd 100644 (file)
@@ -4,10 +4,8 @@
 // Name: Duncan Mak  (duncan@ximian.com)
 //
 // (C) Ximian, Inc.
-//
-
-//
 // Copyright (C) 2004 Novell, Inc (http://www.novell.com)
+// Copyright 2011 Xamarin Inc. All rights reserved.
 //
 // Permission is hereby granted, free of charge, to any person obtaining
 // a copy of this software and associated documentation files (the
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-using System;
-
 namespace System.Runtime.InteropServices {
 
        [AttributeUsage (AttributeTargets.Class |
                         AttributeTargets.Interface, Inherited=false)]
        [ComVisible (true)]
-       public sealed class ComImportAttribute : Attribute
-       {
+#if MONOTOUCH
+       // code with [ComImport] will assert when running on device (AOT)
+       // the linker removes the attribute but it's not used, by default, on 
+       // user code. ref: assistly #2357
+       internal
+#else
+       public 
+#endif
+       sealed class ComImportAttribute : Attribute {
+
                public ComImportAttribute ()
                {
                }