Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

asp-net core System.NotSupportedException #16

Open
TimZwerenz opened this issue Jan 2, 2021 · 1 comment
Open

asp-net core System.NotSupportedException #16

TimZwerenz opened this issue Jan 2, 2021 · 1 comment

Comments

@TimZwerenz
Copy link

Hello,
I am trying to use the framework on an asp.net core mvc project but I get an runtime exception. I am able to build the XML document, but directly after that I get the following exception:

System.NotSupportedException
HResult=0x80131515
Message=The invoked member is not supported in a dynamic assembly.
Source=mscorlib
StackTrace:
at System.Reflection.Emit.InternalAssemblyBuilder.get_Location()
at MARC.Everest.Formatters.XML.ITS1.CodeGen.CodeGenFormatter.CreateFormatterAssembly(Type[] rmimTypes, List`1 aides, Boolean generateDeep)
at MARC.Everest.Formatters.XML.ITS1.XmlIts1Formatter.BuildCache(Type[] t)
at MARC.Everest.Threading.WaitThreadPool.DoWorkItem(WorkItem state)
at MARC.Everest.Threading.WaitThreadPool.DispatchLoop()
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()

I am using the .NET Framework 4.6.1 and I already know that the problem comes from my method for formatting the document:

private static void PrintXml(ClinicalDocument ccda, Stream stream)
{

        MARC.Everest.Formatters.XML.ITS1.XmlIts1Formatter fmtr = new MARC.Everest.Formatters.XML.ITS1.XmlIts1Formatter();
        fmtr.GraphAides.Add(new DatatypeFormatter());
        fmtr.ValidateConformance = false;
        XmlStateWriter xsw = new XmlStateWriter(XmlWriter.Create(stream, new XmlWriterSettings() { Indent = true }));
        fmtr.Graph(xsw, ccda);
        xsw.Flush();
    }

If someone can help me fixing this I would be really thankful

@TimZwerenz
Copy link
Author

The problem is in the .Graph method.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant