Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7411673
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T06:25:24+00:00 2026-05-29T06:25:24+00:00

I have a .NET application that uses an assembly (.dll) that defines some method:

  • 0

I have a .NET application that uses an assembly (.dll) that defines some method:

    public void DoSomething()
    {
        // Do work
    }

Suppose this method signature changes to include a string return type:

    public string DoSomething()
    {
        // Do work
        return "something";
    }

Why does the code that uses this method fails on a System.MissingMethodException ?

It seems to me, that at all call sites to this method, no use was made of the return value (since it did not exist before).

Why does this change break the code then?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T06:25:25+00:00Added an answer on May 29, 2026 at 6:25 am

    Because you did a breaking api change. You did either change the method signature in a base class or an interface.

    The callers are linked against this method. In IL a method reference is not only a reference to a type and its method with some index to the method but the callers method references does include the complete method signature.

    This change is therefore fixable by a recompile of all assemblies that call this method but you get run time exceptions when you only recompile the changed assembly and hope the the using assemblies will magically pick up the changed method signature. This is not the case because the method reference does contain the complete method signature and defining type.

    It did happen to me also. You are right that nobody could use the return type so this change is safe but you need to recompile all affected targets.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a .NET application that uses some API calls, for example GetPrivateProfileString .
I have an ASP.NET application that uses a custom .NET library (a .DLL file).
I have a 32-bit .net application that uses a native 32-bit DLL via DllImport().
I have a .net 2.0 application that uses the System.Net.Sockets Send() method to send
I have a .NET 4.0 web application that uses a .NET 2.0 assembly. I've
I have an ASP.net application that uses some common business object that we have
I have an ASP.NET MVC application that uses Linq to SQL repositories for all
I have an asp.net application (relying party) that uses a passive STS for authentication
We have an ASP.NET application running at a customer site that uses ActiveDirectory for
I have an application that uses the .NET framework 3.5. I am building this

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.