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

Installing two FHIR versions in same project clobbers specification.zip #1657

Closed
vadi2 opened this issue Mar 12, 2021 · 5 comments · Fixed by FirelyTeam/firely-docs-firely-net-sdk#2
Assignees
Labels
bitesize! documentation Issue for documentation

Comments

@vadi2
Copy link
Contributor

vadi2 commented Mar 12, 2021

Describe the bug
Installing the SDK for two versions of FHIR produces a single specification.zip in the output, which means that only one version will actually work.

Suggestion: Iinclude the version of the FHIR spec in the name of the specification.zip.

To Reproduce
Steps to reproduce the behavior:

  1. Use both Hl7.Fhir.Specification.STU3 and Hl7.Fhir.Specification.R4 in the same project
  2. Build project
  3. Observe output
@alexzautke
Copy link
Member

In Firely Server we solve the issue by renaming the specification zip. The following snippet can be added to the .csproj

  <ItemGroup>
    <Content Include="$(PkgHl7_Fhir_Specification_STU3)\contentFiles\any\any\specification.zip">
      <Link>specification_Fhir3_0.zip</Link>
      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
      <CopyToPublishDirectory>Always</CopyToPublishDirectory>
      <Pack>false</Pack>
    </Content>
  </ItemGroup>

Make sure to set GeneratePathProperty to true in the PackageReference:

  <ItemGroup>
    <PackageReference Include="Hl7.Fhir.Specification.STU3" Version="$(FhirNetApiVersionR3)" GeneratePathProperty="true" ExcludeAssets="contentFiles" />
  </ItemGroup>

@marcovisserFurore
Copy link
Member

marcovisserFurore commented Mar 12, 2021

Hi Vadim,
Like @alexzautke already pointed out, there is a workaround to overcome multiple specification.zip with the same name. When we would include the version number in the name, a lot of our users will encounter backward compatibility issues, while they probably depend on this name (specification.zip).

@brianpos
Copy link
Collaborator

And that name is also in the ZipSource.CreateValidationSource() routine that everyone uses.

@marcovisserFurore
Copy link
Member

We will document this in docs.fire.ly. No code change.

@marcovisserFurore
Copy link
Member

See documentation here: https://docs.fire.ly/projects/Firely-NET-SDK/model/multiple-fhir-versions.html

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

Successfully merging a pull request may close this issue.

4 participants