FHIR Chat · Problem when using STU3 and R4 package in the same project · dotnet

Stream: dotnet

Topic: Problem when using STU3 and R4 package in the same project


view this post on Zulip Lars Seltner (Feb 06 2020 at 11:32):

Good afternoon,

I have a project where i has to use STU3 and R4 assemblies parallel, i has defined an alias for the version specific assemblies, in my case

Alias R4:
Hl7.Fhir.R4.Core
Hl7.Fhir.R4.Specification

Alias STU3:
Hl7.Fhir.STU3.Core
Hl7.Fhir.STU3.Specification

When i wants to parse a MessageDefinition object from a given XML-structure to the corresponding object, with the Hl7.Fhir.Serialization.FhirXmlParser-parse method, i gets the following exception:

Inner exeception 1:
TypeLoadException: Die Methode "GetElements" im Typ "Hl7.Fhir.Specification.PocoComplexTypeSerializationInfo" der Assembly "Hl7.Fhir.STU3.Core, Version=1.2.1.0, Culture=neutral, PublicKeyToken=d706911480550fc3" hat keine Implementierung (is not implemented).

The function works fine in a project which contains only the STU3 refeferences.

I did found this post, https://github.com/FirelyTeam/fhir-net-api/issues/834, where is described a similar problem between DSTU2 and STU3.

Is there a way to use different releases for the same project ?

Thanks a lot.

Yours sincerely,

Lars Seltner

view this post on Zulip Brian Postlethwaite (Feb 06 2020 at 22:34):

Have you compared your code with the code in the FHIRPathTester project? That's how I've done it (as referenced in the tracker you've highlighted)

view this post on Zulip Brian Postlethwaite (Feb 06 2020 at 22:35):

There is a UWP project and a WPF project which use the 2 different reference approaches

view this post on Zulip Brian Postlethwaite (Feb 06 2020 at 22:36):

Grab that code locally, update to the version of the FHIR libs you're using and see if that works.

view this post on Zulip Lars Seltner (Feb 07 2020 at 13:22):

Thanks a lot for your help, seem so that I had some problems with the referenced assemblies, I downgraded to the 1.3.0 Version to test it with the same version like your project and it works and then I updated to 1.5.0 again and it still works.

view this post on Zulip Brian Postlethwaite (Feb 07 2020 at 22:24):

Cool. Maybe app.config was forcing an incorrect binding, or missing one. Glad it's all good now though.

view this post on Zulip Brian Postlethwaite (Feb 07 2020 at 22:25):

(I must update the tool again soonish)


Last updated: Apr 12 2022 at 19:14 UTC