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=79182 --- shadow/79182 2006-08-27 07:23:44.000000000 -0400 +++ shadow/79182.tmp.5922 2006-08-31 15:36:37.000000000 -0400 @@ -2,15 +2,15 @@ Product: Mono: Class Libraries Version: unspecified OS: GNU/Linux [Other] OS Details: Ubuntu 6.06 (dapper) Status: NEW Resolution: -Severity: +Severity: Unknown Priority: Critical -Component: CORLIB +Component: System AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] QAContact: [EMAIL PROTECTED] TargetMilestone: --- URL: Cc: @@ -57,6 +57,34 @@ I know this is VS2005 but System.Resources.ResourceSet is a .NET 1.1 class. ------- Additional Comments From [EMAIL PROTECTED] 2006-08-27 07:23 ------- Created an attachment (id=17525) Example VS.NET project as zip file + +------- Additional Comments From [EMAIL PROTECTED] 2006-08-31 15:36 ------- +I solved down the problem to the ComponentResourceManager. +It close the ResourceSet. (ResourceSet.Close() is ...Dispose()). + +So the first ApplyResources() works well, but the second raise this error. +Its because: +ResourceSet rset = GetResourceSet (culture, true, true); + +GetResourceSet returns a disposed ResourceSet. +/* if we already have this resource set, return it */ +set=(ResourceSet)ResourceSets[culture]; +if(set!=null) { + return(set); +} + +System.ComponentModel.ComponentResourceManager resources = new +System.ComponentModel.ComponentResourceManager(typeof(Form1)); +[...] +resources.ApplyResources(this.button1, "button1"); +[...] +resources.ApplyResources(this.button2, "button2"); <== 2nd call, exception +[...] +------------------ + +So removing of "rset.Close ();" from +System.Resources/ResourceSet.ApplyResources() solve the problem with +the "System.InvalidOperationException: ResourceSet is closed." exception. _______________________________________________ mono-bugs maillist - [email protected] http://lists.ximian.com/mailman/listinfo/mono-bugs
