| Rory's profiledotNotedPhotosBlogLists | Help |
|
September 05 InternalsVisibleTo needs the whole public key in CLR v2.0 RTMHopefully, this post will help the search engines to set the record straight about the InternalsVisibleTo attribute for creating friend assemblies. A number of notable .Net voices (Oliver, Juval, James World) used this attribute in pre-RTM code, when the public key token was used, but Microsoft changed it in the release. In one post in particular, a commenter, Neil, was trying to say that PublicKeyToken isn't available for InternalsVisibleTo - only PublicKey is. C# MVP Oliver Sturm counters by explaining that it seems pointless to use the whole public key, since it is so much longer to copy than the public key token. While this is true, he apparently was unaware of the change when he wrote this. It was changed in .Net 2.0 RTM. MSDN, after remaining inaccurate after release for some 9 months, now shows the correct syntax. Update: David Kean also points this change out, and notes that it was changed in RC1, which if I recall correctly was released right after the PDC and right before the November RTM. David also has a nifty utility which generates the otherwise onerous attribute for you. Nice. TrackbacksThe trackback URL for this entry is: http://dotnoted.spaces.live.com/blog/cns!739DCC71898E38F9!348.trak Weblogs that reference this entry
|
|
|