Questions tagged [missingmethodexception]

The .NET exception that is thrown when there is an attempt to dynamically access a method that does not exist.

Normally a compilation error is generated if code attempts to access a nonexistent method of a class. MissingMethodException is designed to handle cases where an attempt is made to dynamically access a renamed or deleted method of an assembly that is not referenced by its strong name. MissingMethodException is thrown when code in a dependent assembly attempts to access a missing method in an assembly that was modified.

MissingMethodException uses the HRESULT COR_E_MISSINGMETHOD, that has the value 0x80131513.

http://msdn.microsoft.com/en-us/library/system.missingmethodexception(v=vs.110).aspx

Sometimes MissingMethodExection occurs after upgrading a program and thus the assembly versions. These problems can be fixed by updating the App.config files. For an example see: MissingMethodException when migrating from F# 3.0 to F# 3.1

139 questions
186
votes
28 answers

ASP.NET MVC: No parameterless constructor defined for this object

Server Error in '/' Application. -------------------------------------------------------------------------------- No parameterless constructor defined for this object. Description: An unhandled exception occurred during the execution of the…
Jim G.
  • 15,141
  • 22
  • 103
  • 166
40
votes
1 answer

System.MissingMethodException after adding an optional parameter

I am getting error of System.MissingMethodException after I have an optional parameter in one component and the other component which call it was not build as it call it with old number of parameters. Only component in which parameter is added was…
sandeep
  • 996
  • 2
  • 11
  • 22
27
votes
10 answers

Activator.CreateInstance can't find the constructor (MissingMethodException)

I have a class which has the following constructor public DelayCompositeDesigner(DelayComposite CompositeObject) { InitializeComponent(); compositeObject = CompositeObject; } along with a default constructor with no parameters. Next I'm…
TimothyP
  • 21,178
  • 26
  • 94
  • 142
11
votes
4 answers

Why is it not possible to catch MissingMethodException?

I have a dependency on .NET 2.0 SP2 in my ClickOnce deployed application (the ApplicationDeployment.CurrentDeployment.CheckForDetailedUpdate(false) method is SP2 only). I would like to check whether SP2 is present during app startup. I have tried to…
Marek
  • 10,307
  • 8
  • 70
  • 106
10
votes
2 answers

MissingMethodException with Newtonsoft.Json when using TypeNameAssemblyFormat with PCLs

Is there a problem with using the TypeNameAssemblyFormat with PCLs? I have no problems using any other settings with Newtonsoft.Json except when I use this serialization setting. Here is my Json-related code: var settings = new…
9
votes
4 answers

Xamarin.Forms MissingMethodException: 'Android.Support.V4.Widget.DrawerLayout.AddDrawerListener' not found

I have followed everything from the following link: https://developer.xamarin.com/guides/xamarin-forms/user-interface/navigation/master-detail-page/ The code I wrote can be found here: http://github.com/foyzulkarim/XamarinFormsDrawer I successfully…
8
votes
2 answers

System.MissingMethodException when using certain methods from FSharp PowerPack and compiling to a Class Library

So I'm just getting started with F#, and I'm encountering a very weird issue where I get a System.MissingMethodException thrown when using certain methods from the FSharp PowerPack. This does not happen for all methods in the same module. It also…
Redwood
  • 66,744
  • 41
  • 126
  • 187
7
votes
4 answers

MissingMethodException when running a unit test that uses FSharp.Data

I have a NUnit unit test that is written in a normal F# library but targets F# code in a Portable Class Library. When I run this test (in Visual Studio 2013), I get the following exception: Result Message: System.MissingMethodException : Method not…
Tiago
  • 737
  • 5
  • 20
7
votes
1 answer

Groovy (GPars) and MissingMethodException when calling eachParallel()

When I run the following code in the console (groovy 2.1.3): strings = [ "butter", "bread", "dragon", "table" ] strings.eachParallel{println "$it0"} I get: groovy.lang.MissingMethodException: No signature of method:…
Armin
  • 1,367
  • 1
  • 12
  • 17
5
votes
1 answer

Get Visual Studio to deploy dbnetlib.dll on Windows CE

I'm developing a device application, using a connection with a 'regular' Sql Server 2005 (not a Compact DB). Whenever I try to open SqlConnection on Windows CE (a Datalogic Memor CE), I’m getting a MissingMethodException: Can't find PInvoke DLL…
5
votes
1 answer

MissingMethodException when using Unquote asserts

I'm trying to use unquote with NUnit as the test runner. The test case is taken from Getting Started and works as expected when run outside of NUnit: namespace FsTest.Tests open NUnit.Framework open Swensen.Unquote [] module Example…
Serge Belov
  • 5,633
  • 1
  • 31
  • 40
4
votes
1 answer

FSharp.Data missing method exception

I am trying to resolve a MissingMethodException in a pre-compiled F# Azure Function. The exception is thrown when I call an extension method from FSharp.Data.CssSelectorExtensions. The function is defined in a .Net Framework 4.6.2 class library. I…
John Hoerr
  • 7,955
  • 2
  • 30
  • 40