[Mono-devel-list] [PATCH] Check for assembly attributes

Carlos Alberto Cortez calberto.cortez at gmail.com
Thu Aug 4 01:07:27 EDT 2005


Below my comments.

El jue, 04-08-2005 a las 00:46 -0400, Ben Maurer escribió:
> On Wed, 2005-08-03 at 20:55 -0500, Carlos Alberto Cortez wrote:
> > Hey,
> > 
> > A patch is attached, containing a check for InternalsVisibleToAttribute,
> > when it is applied to an assembly. It reports a warning or shows an
> > error, just like csc does.
> > +                       if (t.Equals (typeof (System.Runtime.CompilerServices.InternalsVisibleToAttribute))) {
> This precludes us from using the assembly in mscorlib.dll. It could
> potentially be useful to use there -- say to let us write nunit tests
> that poked at internals.

I'm not very sure about the scenarios you are thinking in. Could you
please show some detailed examples?

> See http://blogs.msdn.com/junfeng/archive/2004/09/14/229254.aspx about
> how there is support for handling commas in file names. Your code would
> break under this.

Well, I didn't know about that, but IHMO I find it like a very bad
practice, and I'm sure that there aren't people out there who like to
call their assemblies 'My,Assembly,Version=xx..." or something like

Also, to test this, I tried to load an assembly named
'Test,Assembly' (using Assembly.Load ()) in both mono and ..NET, and
neither could load it successfully. The only way to work with it AFAIK
is when you get name of the assembly itself, or use Assembly.LoadFrom.

So, I don't think it's that important. But, if anybody find it
neccessary, we could add it.

> Finally, comparisons should be done with the invariant culture.
> -- Ben

Thanks, I just noted that's the way the comparisons are done in the


More information about the Mono-devel-list mailing list