I've got a very weird problem,


Basically I have the following setup,



1.      a Custom attribute class
2.      a DLL that uses the custom attribute
3.      a reader that checks a DLL for the custom attributes class
System.Attribute.IsDefined(t,typeof(Multichoice.Attributes.RuntimeConfig))
4.      when the attribute is discovered it is collected and cast into a
waiting variable config =
(Multichoice.Attributes.RuntimeConfig)Attribute.GetCustomAttribute(t,typeof(
Multichoice.Attributes.RuntimeConfig));



in most cases step 3 returns false and step 4 fails even when the object is
the type it is being cast to or the attribute does exist, this can be
confirmed by collecting the attributes from the type,  even if I collect the
attributes from the type and find the correct attribute in the array the
cast fails, the objects can not be different as there is only on version of
the attribute DLL  on the machine, in fact there is only one copy of the
attribute dll on the machine, but still it fails??, both the DLL using the
attribute and the component interrogating for the attribute reference the
same file build using the same file reside in the same folder, why does .NET
insist that the following types are not the same



A.       Multichoice.Attributes.RuntimeConfig, Multichoice.Attributes,
Version=1.1.2004.17827, Culture=neutral, PublicKeyToken=aa94827d81467af7

B.       Multichoice.Attributes.RuntimeConfig, Multichoice.Attributes,
Version=1.1.2004.17827, Culture=neutral, PublicKeyToken=aa94827d81467af7







Paul Stevens
Analyst Developer
MultiChoice Africa
Cellular: * +27 (0) 82 413 3171
Phone: * +27 (0) 11 289 3576
Fax: * +27 (0) 82 131 413 3171
Mail: * [EMAIL PROTECTED]




**************************************************************************************************************************
Everything in this e-mail and attachments relating to the official business of 
MultiChoice Africa is proprietary to
the company. Any view or opinion expressed in this message may be the view of the 
individual and should not automatically
be ascribed to the company.  If you are not the intended recipient, you may not 
peruse, use, disseminate, distribute or
copy this message. If you have received this message in error, please notify the 
sender immediately by email, facsimile
or telephone and destroy the original message.
**************************************************************************************************************************

===================================
This list is hosted by DevelopMentor�  http://www.develop.com
Some .NET courses you may be interested in:

NEW! Guerrilla ASP.NET, 26 Jan 2004, in Los Angeles
http://www.develop.com/courses/gaspdotnetls

View archives and manage your subscription(s) at http://discuss.develop.com

Reply via email to