I'm debugging old code to see why an exception is being thrown and I'm not sure if the missing method is coming from the assembly or somewhere in my code?
Here is the snippet
var assembly = System.Reflection.Assembly.LoadFrom(@"d:\SomePath\ManualLoad Parsers\Generic.dll);
var type = assembly.GetType("Generic.Type1"); // exception thrown here
Here is the exception:
Method not found: 'System.String TpWebsiteCore.ManualLoading.ISpreadSheetParser.ParseRawData(TpWebsiteCore.ManualLoading.IWorkbookWrapper, System.String, Int32[], Tp.DataModels.Sql1DB)'.
I see the interface for 'ParseRawData' is in the code, but I'm not sure if the missing method exception is coming from a missing method in the assembly that the run time environment can't find??
I also looked at the assembly variable in the immediate window and here is what I see.
assembly {Generic, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null} CodeBase: "file:///d:/Tp/ManualLoad Parsers/Generic.dll" CustomAttributes: Count = 14 DefinedTypes: '((System.Reflection.RuntimeAssembly)assembly).DefinedTypes' threw an exception of type 'System.Reflection.ReflectionTypeLoadException' EntryPoint: null EscapedCodeBase: "file:///d:/Tp/ManualLoad%20Parsers/Generic.dll" Evidence: {System.Security.Policy.Evidence} ExportedTypes: 'assembly.ExportedTypes' threw an exception of type 'System.MissingMethodException' FullName: "Generic, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" GlobalAssemblyCache: false HostContext: 0 ImageRuntimeVersion: "v4.0.30319" IsDynamic: false IsFullyTrusted: true Location: "d:\Tp\ManualLoad Parsers\Generic.dll" ManifestModule: {Generic.dll} Modules: {System.Reflection.RuntimeModule[1]} PermissionSet: { } ReflectionOnly: false SecurityRuleSet: Level2
Any help would be great!
Aucun commentaire:
Enregistrer un commentaire