Incorrect [ComVisible(false)] in "create project" output

2 posts, 0 answers
  1. J.
    J. avatar
    3 posts
    Member since:
    May 2012

    Posted 18 Jun 2012 Link to this post

    This may be a new bug; I just installed 2012.2.612.1 and do not think it was in older output.

    There is no manifestation of this, as far as I can tell, in the interactive window -- only when "create project" is used.  What I see is the addition of a "using" statement

    using System.Runtime.InteropServices;

    and an incorrect [ComVisible(false)] attribute before the declaration of a public class (it doesn't seem to matter if the class is static):

    namespace MyNamespace
    public class MyClass
    { ....

    ILDASM output clearly shows that the actual constructor call passes "true" not "false":

    .custom instance void [mscorlib]System.Runtime.InteropServices.ComVisibleAttribute::.ctor(bool)
               = {bool(true)}

    #1:  The parameter value should be correct in the output code!
    #2:  Given that the default for this attribute is "true" there shouldn't be any representation of it in the output.
    #3:  (This is a nit.)  In general, if there is only one reference to a class in a block of code, it would be less disruptive to our examination of the code if the single reference were fully namespace qualified rather than having a "using" statement.  Thus if it were actually correct to have a ComVisible(false) attribute shown, I would rather see

  2. Tsviatko Yovtchev
    Tsviatko Yovtchev avatar
    549 posts

    Posted 22 Jun 2012 Link to this post


     That is a really weird problem. So let me just make sure I got everything right. In the JD GUI there is no ComVisible attribute and when you create project teh ComVisible attribute appears but it has wrong constructor argument. Is that the case? 

    Can we get a copy of the assembly where that happens? If that's not possible can we get the IL output for that class in JD GUI?

    Kind regards,
    Tsviatko Yovtchev
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Back to Top