Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by [EMAIL PROTECTED]

http://bugzilla.ximian.com/show_bug.cgi?id=78519

--- shadow/78519        2006-05-27 19:27:37.000000000 -0400
+++ shadow/78519.tmp.1137       2006-05-27 19:27:37.000000000 -0400
@@ -0,0 +1,87 @@
+Bug#: 78519
+Product: Mono: Class Libraries
+Version: 1.1
+OS: 
+OS Details: Gentoo Linux
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Major
+Component: System
+AssignedTo: [EMAIL PROTECTED]                            
+ReportedBy: [EMAIL PROTECTED]               
+QAContact: [EMAIL PROTECTED]
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: RegistryKey.GetSubKeyNames() returns unix paths instead of key names. 
+
+Usng version 1.1.15, I'm getting a ClassCastException with the following
+code. Robert Jordan is reporting that he gets:
+
+Unhandled Exception: System.ArgumentException: key
+/home/robertj/.mono/registry/LocalMachine/software/nunit.org/nunit/2.4/foo
+at HKEY_DYN_DATA\software\nunit.org\nunit\2.4
+in <0x000e8> Microsoft.Win32.RegistryKey:DeleteSubKeyTree (System.String
+keyName)
+in (wrapper remoting-invoke-with-check)
+Microsoft.Win32.RegistryKey:DeleteSubKeyTree (string)
+
+When he runs it.
+
+This bug is causing us to Platform exclude core tests from NUnit on Mono/Linux.
+
[EMAIL PROTECTED] ~/workspace/monobugs $ mono -V
+Mono JIT compiler version 1.1.15, (C) 2002-2005 Novell, Inc and
+Contributors. www.mono-project.com
+        TLS:           normal
+        GC:            Included Boehm (with typed GC)
+        SIGSEGV:       normal
+        Disabled:      none
+
[EMAIL PROTECTED] ~/workspace/monobugs $ cat regtest.cs
+using Microsoft.Win32;
+using System;
+
+public class RegBug
+{
+  public static void Main(String[] args)
+  {
+    string subkey = @"Software\nunit.org\Nunit\2.4";
+    using(RegistryKey key = Registry.LocalMachine.CreateSubKey(subkey))
+    using(RegistryKey fooKey = key.CreateSubKey("foo"))
+    {
+        Console.WriteLine("Setting Values");
+        key.SetValue("X", 5);
+        fooKey.SetValue("Y", 6);
+
+        Console.WriteLine("Clearing Names");
+        foreach(string name in key.GetValueNames())
+          key.DeleteValue(name);
+
+        Console.WriteLine("Clearing Subkeys");
+        foreach(string name in key.GetSubKeyNames())
+          key.DeleteSubKeyTree(name);
+    }
+
+    Console.WriteLine("All Clear");
+
+  }
+}
+
[EMAIL PROTECTED] ~/workspace/monobugs $ mcs regtest.cs
[EMAIL PROTECTED] ~/workspace/monobugs $ mono regtest.exe
+Setting Values
+Clearing Names
+
+Unhandled Exception: System.InvalidCastException: Cannot cast from source
+type to destination type.
+in <0x0008a> Microsoft.Win32.UnixRegistryApi:DeleteValue
+(Microsoft.Win32.RegistryKey rkey, System.String value, Boolean
+throw_if_missing)
+in <0x00035> Microsoft.Win32.RegistryKey:DeleteValue (System.String value,
+Boolean shouldThrowWhenKeyMissing)
+in <0x0000f> Microsoft.Win32.RegistryKey:DeleteValue (System.String value)
+in (wrapper remoting-invoke-with-check)
+Microsoft.Win32.RegistryKey:DeleteValue (string)
+in <0x00120> RegBug:Main (System.String[] args)
_______________________________________________
mono-bugs maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-bugs

Reply via email to