[Mono-list] Assembly.CreateInstance(string className) bug
Philippe Lavoie
philippe.lavoie@cactus.ca
Tue, 13 May 2003 12:41:11 -0400
This is a multi-part message in MIME format.
------_=_NextPart_001_01C3196E.75ECF814
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
The fix was so fast, I decided to see how long it will take to add a =
unit test for it. Didn't take long :)
Here is a unit test for it. Perhaps someone could add it to the suit of =
Unit tests? Not sure where it is by the way.
That unit test passes in Visual Studio .Net 2003 (aka .NET 1.1)
On a side note, to find bugzilla I had to look at the FAQ, I didn't see =
any link from the main page.
Philippe Lavoie
=20
Cactus Commerce Software Developer * D=E9veloppeur de =
logiciels
eBusiness. All Business. philippe.lavoie@cactuscommerce.com
=20
-----Original Message-----
From: Gonzalo Paniagua Javier [mailto:gonzalo@ximian.com]=20
Sent: Tuesday, May 13, 2003 12:00 PM
To: mono-list@lists.ximian.com
Subject: Re: [Mono-list] Assembly.CreateInstance(string className) bug
El mar, 13 de 05 de 2003 a las 14:53, Dominik Fretz escribi=F3:
> Hi
>=20
> I found a difference between the MS.NET framework and mono:
> object foo =3D Assembly.GetCallingAssembly().CreateInstance("FooBar");
> causes a 'System.TypeLoadException' with mono.
> On the .NET framework, foo is null after this and no exception is =
raised.
>=20
> I filed bug number 42883 and added some code to show.
Fixed in CVS.
-Gonzalo
_______________________________________________
Mono-list maillist - Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list
------_=_NextPart_001_01C3196E.75ECF814
Content-Type: application/octet-stream;
name="Bug42883.cs"
Content-Transfer-Encoding: base64
Content-Description: Bug42883.cs
Content-Disposition: attachment;
filename="Bug42883.cs"
dXNpbmcgU3lzdGVtOw0KdXNpbmcgU3lzdGVtLlJlZmxlY3Rpb247DQoNCnVzaW5nIE5Vbml0LkZy
YW1ld29yazsNCg0KbmFtZXNwYWNlIE51bml0VGVzdHMNCnsNCg0KCS8vLyA8c3VtbWFyeT4NCgkv
Ly8gQXNzZW1ibHkuQ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