X12Reader exception


MissingMethodException: Method not found: 'System.Reflection.Emit.AssemblyBuilder System.AppDomain.DefineDynamicAssembly(System.Reflection.AssemblyName, System.Reflection.Emit.AssemblyBuilderAccess)'.

My Code:

public class ImportController : Controller
private static Import im = new Import("");
private FileInfo[] files;

//File location to always be known
public IActionResult ImportView()
var outFile = AppContext.BaseDirectory + "..\\..\\..\\test\\test.xml";
//To be replaced by MessageQueue
files = new DirectoryInfo(AppContext.BaseDirectory + "..\\..\\..\\test\\")
foreach (FileInfo f in files)
using (var stream = new MemoryStream(System.IO.File.ReadAllBytes(f.ToString())))
// Create Global list of edi items. All EDI Fabric edi types inherits IEdiItem
List<IEdiItem> ediItems;
// Create EDI Fabric X12 reader and provide classification of supported edi types and version
using (var reader = new X12Reader(stream, TemplateFactory.FullTemplateFactory))

***** Error occurs on above line


1 comment
  • Check your TemplateFactory.FullTemplateFactory - does Assembly.Load work with the assemblies you are trying to load? It's either the assemblies are missing or the assembly name is wrong.


    Comment actions Permalink

Please sign in to leave a comment.

Didn't find what you were looking for?

New post