G
Guest
We have just migrated to VS 2005 and .NET 2.0, and are having some problems
wth GetType and a custom class whose assembly resides in the GAC.
In 1.1, we could call, for example:
System.Type.GetType(""ElanHomeProject.ElanControl.ElanKeyPad.Z100,
ElanHomeProject");
This work work just fine, returning the type of that particular class.
Now, in 2.0, that call results in a null Type, and the call only seems to
work if we make the GetType call as so:
System.Type.GetType(""ElanHomeProject.ElanControl.ElanKeyPad.Z100,
ElanHomeProject, Version=2.0.0.0, Culture=neutral,
PublicKeyToken=f50445a37b571e16");
Additionally, a call such as:
Type objType = typeof(ElanHomeProject.ElanControl.ElanKeyPad.Z100);
works in 2.0, but the way our application is built, the type is passed as a
string, so we HAVE to use GetType.
Has anyone else had this problem? Can anyone suggest a solution where we
won't have to pass the Version, Culture and PublicKeyToken?
Thank you in advance!
Gabe
wth GetType and a custom class whose assembly resides in the GAC.
In 1.1, we could call, for example:
System.Type.GetType(""ElanHomeProject.ElanControl.ElanKeyPad.Z100,
ElanHomeProject");
This work work just fine, returning the type of that particular class.
Now, in 2.0, that call results in a null Type, and the call only seems to
work if we make the GetType call as so:
System.Type.GetType(""ElanHomeProject.ElanControl.ElanKeyPad.Z100,
ElanHomeProject, Version=2.0.0.0, Culture=neutral,
PublicKeyToken=f50445a37b571e16");
Additionally, a call such as:
Type objType = typeof(ElanHomeProject.ElanControl.ElanKeyPad.Z100);
works in 2.0, but the way our application is built, the type is passed as a
string, so we HAVE to use GetType.
Has anyone else had this problem? Can anyone suggest a solution where we
won't have to pass the Version, Culture and PublicKeyToken?
Thank you in advance!
Gabe