[Mono-dev] assembly config settings

2009-07-17 Thread Gladish, Jacob
I'm having some issues getting an assembly config file to load. When I run 
strace on the mono when starting my app, I see the foo.dll.config found and 
read, but the settings from the file do not appear to be loading as the 
defaults are always returned. Is there something obvious I may be missing?

Thanks
-jake


IMPORTANT: The information contained in this email and/or its attachments is 
confidential. If you are not the intended recipient, please notify the sender 
immediately by reply and immediately delete this message and all its 
attachments. Any review, use, reproduction, disclosure or dissemination of this 
message or any attachment by an unintended recipient is strictly prohibited. 
Neither this message nor any attachment is intended as or should be construed 
as an offer, solicitation or recommendation to buy or sell any security or 
other financial instrument. Neither the sender, his or her employer nor any of 
their respective affiliates makes any warranties as to the completeness or 
accuracy of any of the information contained herein or that this message or any 
of its attachments is free of viruses.
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] p/invoke marshal struct to pointer

2009-07-17 Thread Robert Jordan
Gladish, Jacob wrote:
> The mono runtime seems to have a specific check for this cause and
> throws the exception. I guess what's confusing is that if it's really
> not allowed, then why would the Microsoft runtime allow it?

Maybe it allows it because the said structure is blittable in full.
Please post a test case or at least the signatures and the struct
definition, both managed and unmanaged.

Robert

___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] [PATCH] Change Mono.C5 from common lib to net_2_0 lib

2009-07-17 Thread Zoltan Varga
Looks ok.

 Zoltan

On Fri, Jul 17, 2009 at 5:10 PM, Marcus Griep  wrote:

> Currently Mono.C5 builds even as part of the net_1_1 profile. This is
> unnecessary as Mono.C5 provides and consumes generics, and thus depends
> on net_2_0 at minimum. In order to build in net_1_1, all the files in
> Mono.C5 are surrounded by #ifdef NET_2_0 directives, leading to
> effectively empty files being built into an uninstalled library in the
> net_1_1 profile.
>
> This patch cleans up the Mono.C5 build by moving it to the net_2_0
> profile and removing the now unnecessary #ifdef guards.
> --
> Marcus Griep
> GPG Key ID: 0x070E3F2D
> ——
> https://torproj.xpdm.us
> Ακακια את.ψο´, 3°
>
> ___
> Mono-devel-list mailing list
> Mono-devel-list@lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-devel-list
>
>
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


[Mono-dev] p/invoke marshal struct to pointer

2009-07-17 Thread Gladish, Jacob
I'm using a third-party .NET wrapper around an unmanaged library that was 
intended for use on windows. I'm investigating whether this will work on work 
on Linux and am getting the following exception:

System.Runtime.InteropServices.MarshalDirectiveException: Can not marshal 
'parameter #1': Pointers can not reference marshaled structures. Use byref 
instead.

I can confirm that the .NET wrapper is indeed trying to pass a pointer to a 
managed struct via p/invoke to an unmanaged function. I was curious if anyone 
could confirm to me whether that's a bug in the .NET wrapper or in the 
mono-runtime. This could runs fine on windows using the MS .NET runtime.

The mono runtime seems to have a specific check for this cause and throws the 
exception. I guess what's confusing is that if it's really not allowed, then 
why would the Microsoft runtime allow it?

Thanks
-jake


IMPORTANT: The information contained in this email and/or its attachments is 
confidential. If you are not the intended recipient, please notify the sender 
immediately by reply and immediately delete this message and all its 
attachments. Any review, use, reproduction, disclosure or dissemination of this 
message or any attachment by an unintended recipient is strictly prohibited. 
Neither this message nor any attachment is intended as or should be construed 
as an offer, solicitation or recommendation to buy or sell any security or 
other financial instrument. Neither the sender, his or her employer nor any of 
their respective affiliates makes any warranties as to the completeness or 
accuracy of any of the information contained herein or that this message or any 
of its attachments is free of viruses.
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


[Mono-dev] [PATCH] Change Mono.C5 from common lib to net_2_0 lib

2009-07-17 Thread Marcus Griep
Currently Mono.C5 builds even as part of the net_1_1 profile. This is
unnecessary as Mono.C5 provides and consumes generics, and thus depends
on net_2_0 at minimum. In order to build in net_1_1, all the files in
Mono.C5 are surrounded by #ifdef NET_2_0 directives, leading to
effectively empty files being built into an uninstalled library in the
net_1_1 profile.

This patch cleans up the Mono.C5 build by moving it to the net_2_0
profile and removing the now unnecessary #ifdef guards.
-- 
Marcus Griep
GPG Key ID: 0x070E3F2D
——
https://torproj.xpdm.us
Ακακια את.ψο´, 3°
Index: class/Makefile
===
--- class/Makefile	(revision 137818)
+++ class/Makefile	(working copy)
@@ -39,7 +39,6 @@
 	System.Drawing			\
 	System.Transactions		\
 	System.EnterpriseServices	\
-	Mono.C5\
 	Mono.Data.Tds			\
 	System.Data			\
 	Mono.Data			\
@@ -116,6 +115,7 @@
 	System.ServiceModel		\
 	System.ServiceModel.Web		\
 	System.Web.Mvc			\
+	Mono.C5\
 	Mono.Management			\
 	Mono.Options 			\
 	Mono.Simd			\
Index: class/Mono.C5/add-conditional.pl
===
--- class/Mono.C5/add-conditional.pl	(revision 137818)
+++ class/Mono.C5/add-conditional.pl	(working copy)
@@ -1,16 +0,0 @@
-#!/usr/bin/perl -w
-use strict;
-
-foreach my $file (@ARGV) {
-open FILE,"+<",$file;
-my $contents = "";
-while (defined ($_ = )) {
-	$contents .= $_;
-}
-truncate FILE, 0;
-seek FILE, 0, 0;
-print FILE "#if NET_2_0\n";
-print FILE $contents . "\n";
-print FILE "#endif\n";
-close FILE;
-}
Index: class/Mono.C5/C5/Dictionaries.cs
===
--- class/Mono.C5/C5/Dictionaries.cs	(revision 137818)
+++ class/Mono.C5/C5/Dictionaries.cs	(working copy)
@@ -1,4 +1,3 @@
-#if NET_2_0
 /*
  Copyright (c) 2003-2006 Niels Kokholm and Peter Sestoft
  Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -1294,4 +1293,3 @@
 
   }
 }
-#endif
Index: class/Mono.C5/C5/hashing/HashTable.cs
===
--- class/Mono.C5/C5/hashing/HashTable.cs	(revision 137818)
+++ class/Mono.C5/C5/hashing/HashTable.cs	(working copy)
@@ -1,4 +1,3 @@
-#if NET_2_0
 /*
  Copyright (c) 2003-2006 Niels Kokholm and Peter Sestoft
  Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -1599,5 +1598,3 @@
 
   }
 }
-
-#endif
Index: class/Mono.C5/C5/hashing/HashBag.cs
===
--- class/Mono.C5/C5/hashing/HashBag.cs	(revision 137818)
+++ class/Mono.C5/C5/hashing/HashBag.cs	(working copy)
@@ -1,4 +1,3 @@
-#if NET_2_0
 /*
  Copyright (c) 2003-2006 Niels Kokholm and Peter Sestoft
  Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -677,5 +676,3 @@
 #endregion
   }
 }
-
-#endif
Index: class/Mono.C5/C5/hashing/HashDictionary.cs
===
--- class/Mono.C5/C5/hashing/HashDictionary.cs	(revision 137818)
+++ class/Mono.C5/C5/hashing/HashDictionary.cs	(working copy)
@@ -1,4 +1,3 @@
-#if NET_2_0
 /*
  Copyright (c) 2003-2006 Niels Kokholm and Peter Sestoft
  Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -76,4 +75,3 @@
 
   }
 }
-#endif
Index: class/Mono.C5/C5/Collections.cs
===
--- class/Mono.C5/C5/Collections.cs	(revision 137818)
+++ class/Mono.C5/C5/Collections.cs	(working copy)
@@ -1,4 +1,3 @@
-#if NET_2_0
 /*
  Copyright (c) 2003-2006 Niels Kokholm and Peter Sestoft
  Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -1519,5 +1518,3 @@
 #endregion
   }
 }
-
-#endif
Index: class/Mono.C5/C5/trees/RedBlackTreeDictionary.cs
===
--- class/Mono.C5/C5/trees/RedBlackTreeDictionary.cs	(revision 137818)
+++ class/Mono.C5/C5/trees/RedBlackTreeDictionary.cs	(working copy)
@@ -1,4 +1,3 @@
-#if NET_2_0
 /*
  Copyright (c) 2003-2006 Niels Kokholm and Peter Sestoft
  Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -79,4 +78,3 @@
 
   }
 }
-#endif
Index: class/Mono.C5/C5/trees/RedBlackTreeBag.cs
===
--- class/Mono.C5/C5/trees/RedBlackTreeBag.cs	(revision 137818)
+++ class/Mono.C5/C5/trees/RedBlackTreeBag.cs	(working copy)
@@ -1,4 +1,3 @@
-#if NET_2_0
 /*
  Copyright (c) 2003-2006 Niels Kokholm and Peter Sestoft
  Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -4488,6 +4487,3 @@
 
   }
 }
-
-
-#endif
Index: class/Mono.C5/C5/trees/RedBlackTreeSet.cs
===
--- class/Mono.C5/C5/trees/RedBlackTreeSet.cs	(revision 137818)
+++ class/Mono.C5/C5/trees/RedBlackTreeSet.cs	(working copy)

Re: [Mono-dev] Adding a dll to gac

2009-07-17 Thread Robert Jordan
PFJ wrote:
> Hi
> 
> I've added the SharpUSBlib dll to gac using gacutil. However, when I try to
> link to it (using -r:ICSharp.USBlib or -r:SharpUSBlib, all I get back is
> that it is missing some sort of metadata (the report is on my machine at
> home).
> 
> Is there something I'm missing here?

Gmcs does not resolve assemblies from the GAC. Since you've created a
pkg-config for your assembly with gacutil, you can reference it with:

gmcs -pkg:SharpUSBlib ...

> The command line I've used is 
> 
> gacutil -i bin/SharpUSBlib.dll -f -package SharpUSBlib -root /usr/lib

Robert

___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


[Mono-dev] Adding a dll to gac

2009-07-17 Thread PFJ

Hi

I've added the SharpUSBlib dll to gac using gacutil. However, when I try to
link to it (using -r:ICSharp.USBlib or -r:SharpUSBlib, all I get back is
that it is missing some sort of metadata (the report is on my machine at
home).

Is there something I'm missing here?

The command line I've used is 

gacutil -i bin/SharpUSBlib.dll -f -package SharpUSBlib -root /usr/lib

which looks ok.

TTFN

Paul



-- 
View this message in context: 
http://www.nabble.com/Adding-a-dll-to-gac-tp24531748p24531748.html
Sent from the Mono - Dev mailing list archive at Nabble.com.

___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list