FHIR Chat · specifization.zip missing in Fhl7.Fhir.Specificiation.STU3 · implementers

Stream: implementers

Topic: specifization.zip missing in Fhl7.Fhir.Specificiation.STU3


view this post on Zulip Jon-Vidar Schneider (Oct 19 2017 at 10:12):

Hi, tried to update to versjon 0.93.5 of Hl7.Fhir.Specification.STU3. Seems to be some problem with specification.zip, it is not added to my project.

Here is my code for creating the validator:

var coreSource = new CachedResolver(ZipSource.CreateValidationSource());
var combinedSource = new MultiResolver(GetResourceResolver(), coreSource);
var settings = new ValidationSettings
{
EnableXsdValidation = true,
GenerateSnapshot = true,
Trace = true,
ResourceResolver = combinedSource,
ResolveExteralReferences = true,
SkipConstraintValidation = false
};
return new Validator(settings);

The following line fails: var coreSource = new CachedResolver(ZipSource.CreateValidationSource()); with the exception

System.IO.FileNotFoundException: 'Cannot create a ZipArtifactSource for the core specification: specification.zip was not found'

For version 0.93.4 it works fine.

view this post on Zulip Lloyd McKenzie (Oct 19 2017 at 13:31):

@Grahame Grieve ?

view this post on Zulip Michel Rutten (Oct 19 2017 at 16:57):

@Jon-Vidar Schneider In the Visual Studio Solution Explorer, select specification.zip and verify the following file properties:

  • Build Action = Content
  • Copy to Output Directory = Copy if Newer

view this post on Zulip Michel Rutten (Oct 19 2017 at 16:59):

Sometimes, VS resets these properties when updating the NuGet package, so you have to manually correct afterwards.

view this post on Zulip Jon-Vidar Schneider (Oct 19 2017 at 22:36):

Sometimes, VS resets these properties when updating the NuGet package, so you have to manually correct afterwards.

In versjon 0.93.4 the file was added to the topfolder where I used the nugetpackege, for 0.93.5 the file was never created. I will try again tomorrow with a clean new webapp to see if it works there. Sometimes Visual studio doesn't retrieve the nucketpackages properly.

view this post on Zulip Michel Rutten (Oct 23 2017 at 11:07):

OK, please let us know if the issues remain.

view this post on Zulip Ewout Kramer (Oct 30 2017 at 16:14):

Hi Jon, from 0.93.4 to 0.93.5 we changed the way specification.zip is included in the Nuget package. Previously, we used an install script that ran after installation of the NuGet package, but this use has been deprecated by Microsoft & the newer NuGet format (since 3.3) has support for explicit transitive includes. This should improve the behaviour (in fact, the old behaviour is supposed to be completely broken now), but if you still encounter issues, we'll have to track down what's going on.


Last updated: Apr 12 2022 at 19:14 UTC