cannot explicitly call operator or accessor

2 posts, 0 answers
  1. Joe
    Joe avatar
    1 posts
    Member since:
    Dec 2013

    Posted 13 Mar 2014 Link to this post

    Sorry if this has already been answered, but I can't find it in the forum (or anywhere else):

    I've used JustDecompile before, but only for some DLLs. Now I'm trying to decompile an old WInForms app, and the generated code has lots of lines that look like :
        if (this.button1.get_Text() == "Migrate")

    When I try to compile the generated code, I get hundreds of errors like :
    "System.WIndows.Forms.Control.Text.get': cannot explicitly call operator or accessor"

    Is this a bug in JustDecompile, or is there a way to handle this without making a lot of manual changes?

    Thanks!
  2. Vladimir
    Vladimir avatar
    2 posts
    Member since:
    Mar 2011

    Posted 17 Mar 2014 in reply to Joe Link to this post

    Hello Joe,

    It seems that this DLL was built against framework DLLs that are missing at the moment on your machine (or at least JustDecompile fails to resolve them). get_ and set_ methods are compile generated property accessors, so the code should look like:

    this.button1.Text = "...", etc.

    This can be fixed when you explicitly specify the path to the referenced DLL: Go to your assembly in the assembly tree of JustDecompile, then navigate to "References". All of the unresolved referenced assemblies will have exclamation mark. You can specify their path by: right click on the unresolved assembly and then clicking on the "Locate Assembly" menu item.

    Please let us know if this doesn't fix the issue for you.

    Kind regards,
    Vladi
    The Telerik team
  3. DevCraft banner
Back to Top