Skip to content
This repository has been archived by the owner on Jul 8, 2024. It is now read-only.

Cleanup projectfiles and dependencies #162

Merged
merged 15 commits into from
Dec 8, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions build/build-variables.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Variables used during builds.

variables:
NET_CORE_SDK: 5.0.x
NET_CORE_SDK: 6.0.x
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
TEST_TARGETFRAMEWORK: net5.0
TEST_TARGETFRAMEWORK: net6.0
buildConfiguration: Release
4 changes: 4 additions & 0 deletions build/templates/test-job-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ parameters:
- name: projects

steps:
- task: UseDotNet@2
displayName: 'Use .NET Core sdk $(NET_CORE_SDK)'
inputs:
version: $(NET_CORE_SDK)
- task: DownloadPipelineArtifact@2
inputs:
displayName: Download Build artifacts
Expand Down
2 changes: 1 addition & 1 deletion src/Benchmarks/Benchmarks.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net5.0</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
<AssemblyName>Benchmarks</AssemblyName>
<RootNamespace>Firely.Sdk.Benchmarks.Common</RootNamespace>
</PropertyGroup>
Expand Down
4 changes: 0 additions & 4 deletions src/Hl7.Fhir.ElementModel/Hl7.Fhir.ElementModel.csproj
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0">
<PropertyGroup>
<TargetFrameworks>net5.0;net452;netstandard2.0</TargetFrameworks>
</PropertyGroup>

<Import Project="..\firely-net-common.props" />
<Import Project="..\firely-net-common.targets" />

<PropertyGroup>
<PackageId>Hl7.Fhir.ElementModel</PackageId>
Expand Down
4 changes: 0 additions & 4 deletions src/Hl7.Fhir.Serialization/Hl7.Fhir.Serialization.csproj
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net5.0;net452;netstandard2.0</TargetFrameworks>
</PropertyGroup>

<Import Project="..\firely-net-common.props" />
<Import Project="..\firely-net-common.targets" />

<PropertyGroup>
<PackageId>Hl7.Fhir.Serialization</PackageId>
Expand Down
32 changes: 4 additions & 28 deletions src/Hl7.Fhir.Support.Poco.Tests/Hl7.Fhir.Support.Poco.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,45 +1,21 @@
<Project Sdk="Microsoft.NET.Sdk">

<Import Project="..\firely-net-common.props" />
<Import Project="..\firely-net-common.targets" />
<Import Project="..\firely-net-common-tests.props" />

<PropertyGroup>
<AssemblyName>Hl7.Fhir.Support.Poco.Tests</AssemblyName>
</PropertyGroup>

<ItemGroup>
<None Remove="TestData\fp-test-patient-errors-recovered.json" />
<None Remove="TestData\fp-test-patient-errors.json" />
<None Remove="TestData\fp-test-patient.json" />
<None Remove="TestData\fp-test-patient.xml" />
<None Remove="TestData\mask-text.xml" />
</ItemGroup>

<ItemGroup>
<Content Include="TestData\fp-test-patient-errors-recovered.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="TestData\fp-test-patient-errors.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="TestData\fp-test-patient.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="TestData\fp-test-patient.xml">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="TestData\json-edge-cases.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="TestData\mask-text.xml">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="TestData\**\*.xml;TestData\**\*.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\Hl7.Fhir.Support.Poco\Hl7.Fhir.Support.Poco.csproj" />
<ProjectReference Include="..\Hl7.Fhir.Support.Tests\Hl7.Fhir.Support.Tests.csproj" />
<ProjectReference Include="..\Hl7.Fhir.Support\Hl7.Fhir.Support.csproj" />
</ItemGroup>

</Project>
6 changes: 1 addition & 5 deletions src/Hl7.Fhir.Support.Poco/Hl7.Fhir.Support.Poco.csproj
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net5.0;net452;netstandard2.0</TargetFrameworks>
</PropertyGroup>

<Import Project="..\firely-net-common.props" />
<Import Project="..\firely-net-common.targets" />

<PropertyGroup>
<PackageId>Hl7.Fhir.Support.Poco</PackageId>
Expand All @@ -22,6 +17,7 @@

<ItemGroup Condition=" '$(TargetFramework)' == 'net452'">
<Reference Include="System.ComponentModel.DataAnnotations" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Net.Http"/>
</ItemGroup>

Expand Down
5 changes: 0 additions & 5 deletions src/Hl7.Fhir.Support.Tests/Hl7.Fhir.Support.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
<Project Sdk="Microsoft.NET.Sdk">

<Import Project="..\firely-net-common.props" />
<Import Project="..\firely-net-common.targets" />
<Import Project="..\firely-net-common-tests.props" />

<PropertyGroup>
Expand All @@ -26,7 +24,4 @@
<Reference Include="System.ComponentModel.DataAnnotations" />
</ItemGroup>

<ItemGroup>
<Service Include="{82a7f48d-3b50-4b1e-b82e-3ada8210c358}" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -50,17 +50,17 @@ public void CanEnumerateFhirPrimitive()
public void CanEnumerateCodedValue()
{
IReadOnlyDictionary<string, object> b = new Code<Narrative.NarrativeStatus>(Narrative.NarrativeStatus.Additional);
b.Should().BeEquivalentTo(KeyValuePair.Create("value", Narrative.NarrativeStatus.Additional.GetLiteral()));
b.Should().BeEquivalentTo(new[] { KeyValuePair.Create("value", Narrative.NarrativeStatus.Additional.GetLiteral()) });
}

[TestMethod]
public void CanEnumerateNarrative()
{
IReadOnlyDictionary<string, object> b = new Narrative("<p>bla</p>");
b.Count.Should().Be(2);
b.Should().BeEquivalentTo(
KeyValuePair.Create("div", new XHtml("<p>bla</p>")),
KeyValuePair.Create("status", new Code<Narrative.NarrativeStatus>(Narrative.NarrativeStatus.Generated)));
b.Should().BeEquivalentTo(new[] {
KeyValuePair.Create<string, object>("div", new XHtml("<p>bla</p>")),
KeyValuePair.Create<string, object>("status", new Code<Narrative.NarrativeStatus>(Narrative.NarrativeStatus.Generated)) });
}

[TestMethod]
Expand All @@ -69,9 +69,9 @@ public void CanEnumerateExtension()
// Explicitly test hand-written IROD implementation.
IReadOnlyDictionary<string, object> b = new Extension("http://nu.nl", new FhirBoolean(true));
b.Count.Should().Be(2);
b.Should().BeEquivalentTo(
KeyValuePair.Create("url", "http://nu.nl"),
KeyValuePair.Create("value", new FhirBoolean(true)));
b.Should().BeEquivalentTo(new[] {
KeyValuePair.Create<string, object>("url", "http://nu.nl"),
KeyValuePair.Create<string, object>("value", new FhirBoolean(true)) });

b.TryGetValue("valueString", out _).Should().BeFalse();
b.TryGetValue("valueBoolean", out _).Should().BeFalse();
Expand Down
6 changes: 1 addition & 5 deletions src/Hl7.Fhir.Support/Hl7.Fhir.Support.csproj
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net5.0;net452;netstandard2.0</TargetFrameworks>
</PropertyGroup>

<Import Project="..\firely-net-common.props" />
<Import Project="..\firely-net-common.targets" />

<PropertyGroup>
<PackageId>Hl7.Fhir.Support</PackageId>
Expand All @@ -15,7 +11,7 @@
<AssemblyName>Hl7.Fhir.Support</AssemblyName>
</PropertyGroup>

<ItemGroup Condition=" '$(TargetFramework)' != 'net452'">
<ItemGroup Condition=" '$(TargetFramework)' != 'net452'">
<PackageReference Include="System.Reflection.Emit.Lightweight" Version="4.7.0" />
</ItemGroup>
</Project>
5 changes: 0 additions & 5 deletions src/Hl7.FhirPath.Tests/HL7.FhirPath.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">


<Import Project="..\firely-net-common.props" />
<Import Project="..\firely-net-common.targets" />
<Import Project="..\firely-net-common-tests.props" />

<PropertyGroup>
Expand All @@ -18,7 +16,4 @@
<PackageReference Include="System.ValueTuple" Version="4.5.0" />
</ItemGroup>

<ItemGroup>
<Service Include="{82a7f48d-3b50-4b1e-b82e-3ada8210c358}" />
</ItemGroup>
</Project>
4 changes: 0 additions & 4 deletions src/Hl7.FhirPath/Hl7.FhirPath.csproj
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net5.0;net452;netstandard2.0</TargetFrameworks>
</PropertyGroup>

<Import Project="..\firely-net-common.props" />
<Import Project="..\firely-net-common.targets" />

<PropertyGroup>
<PackageId>Hl7.FhirPath</PackageId>
Expand Down
21 changes: 15 additions & 6 deletions src/firely-net-common-tests.props
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<TargetFrameworks>net5.0</TargetFrameworks>
<TargetFrameworks>net6.0</TargetFrameworks>
</PropertyGroup>

<PropertyGroup>
Expand All @@ -18,15 +18,15 @@
</PropertyGroup>

<ItemGroup Condition="'$(TargetFramework)' != 'net40'">
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.10.0" />
<PackageReference Include="MSTest.TestAdapter" Version="2.2.3" />
<PackageReference Include="MSTest.TestFramework" Version="2.2.3" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.11.0" />
<PackageReference Include="MSTest.TestAdapter" Version="2.2.7" />
<PackageReference Include="MSTest.TestFramework" Version="2.2.7" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.3">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="FluentAssertions" Version="5.10.3" />
<PackageReference Include="FluentAssertions" Version="6.1.0" />
<PackageReference Include="Moq" Version="4.16.1" />
</ItemGroup>

Expand All @@ -35,6 +35,15 @@
<HintPath>..\..\lib\Microsoft.VisualStudio.QualityTools.UnitTestFramework.dll</HintPath>
</Reference>
</ItemGroup>


<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
<SignAssembly>True</SignAssembly>
<DelaySign>true</DelaySign>
<AssemblyOriginatorKeyFile>..\FhirNetApi.publickey</AssemblyOriginatorKeyFile>
<GeneratePackageOnBuild>False</GeneratePackageOnBuild>
<!-- Missing XML comments -->
<NoWarn>1591</NoWarn>
</PropertyGroup>

</Project>

112 changes: 58 additions & 54 deletions src/firely-net-common.props
Original file line number Diff line number Diff line change
@@ -1,60 +1,64 @@
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

<!-- Solution-wide properties for NuGet packaging -->
<PropertyGroup>
<VersionPrefix>4.0.0</VersionPrefix>
<VersionSuffix>alpha</VersionSuffix>
<Authors>Firely (info@fire.ly) and contributors</Authors>
<Company>Firely (https://fire.ly)</Company>
<Copyright>Copyright 2013-2021 Firely. Contains materials (C) HL7 International</Copyright>
<PackageProjectUrl>https://github.com/FirelyTeam/firely-net-common</PackageProjectUrl>
<RepositoryUrl>https://github.com/FirelyTeam/firely-net-common</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<PackageIcon>icon-fhir-32.png</PackageIcon>
<PackageReleaseNotes>See https://github.com/FirelyTeam/firely-net-sdk/releases</PackageReleaseNotes>
<PackageLicenseFile>LICENSE</PackageLicenseFile>
<RunFhirPathTests>true</RunFhirPathTests> <!-- Used for CI/CD pipelines -->
</PropertyGroup>

<ItemGroup>
<None Include="..\..\LICENSE" Pack="true" PackagePath=""/>
<None Include="..\..\icon-fhir-32.png" Pack="true" PackagePath=""/>
</ItemGroup>

<!-- Although netstandard1.1 support codegen using the Expression class, we need at least

<PropertyGroup>
<TargetFrameworks>net6.0;net452;netstandard2.0</TargetFrameworks>
</PropertyGroup>

<!-- Solution-wide properties for NuGet packaging -->
<PropertyGroup>
<VersionPrefix>4.0.0</VersionPrefix>
<VersionSuffix>alpha</VersionSuffix>
<Authors>Firely (info@fire.ly) and contributors</Authors>
<Company>Firely (https://fire.ly)</Company>
<Copyright>Copyright 2013-2021 Firely. Contains materials (C) HL7 International</Copyright>
<PackageProjectUrl>https://github.com/FirelyTeam/firely-net-common</PackageProjectUrl>
<RepositoryUrl>https://github.com/FirelyTeam/firely-net-common</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<PackageIcon>icon-fhir-32.png</PackageIcon>
<PackageReleaseNotes>See https://github.com/FirelyTeam/firely-net-sdk/releases</PackageReleaseNotes>
<PackageLicenseFile>LICENSE</PackageLicenseFile>
<PackageReadmeFile>README.md</PackageReadmeFile>
<RunFhirPathTests>true</RunFhirPathTests> <!-- Used for CI/CD pipelines -->
</PropertyGroup>

<ItemGroup>
<None Include="..\..\LICENSE" Pack="true" PackagePath=""/>
<None Include="..\..\icon-fhir-32.png" Pack="true" PackagePath=""/>
<None Include="..\..\README.md" Pack="true" PackagePath=""/>
</ItemGroup>

<!-- Although netstandard1.1 support codegen using the Expression class, we need at least
one version of our library that does not require it, since iOS does not have support for it.
Considering netstd1.1 is our lowest common denominator, I've chosen that version to not use
codegen -->
<PropertyGroup Condition=" '$(TargetFramework)' != 'netstandard1.1' ">
<DefineConstants>$(DefineConstants)</DefineConstants>
</PropertyGroup>

<!-- Compiler settings -->
<PropertyGroup>
<LangVersion>9.0</LangVersion>
<GenerateDocumentationFile>True</GenerateDocumentationFile>
<Configurations>Debug;Release;FullDebug</Configurations>
</PropertyGroup>

<PropertyGroup Condition=" '$(Configuration)' == 'Debug' Or '$(Configuration)' == 'FullDebug' ">
<DebugType>portable</DebugType>
<DebugSymbols>True</DebugSymbols>
<NoWarn>1591</NoWarn>
<Optimize>false</Optimize>
<DefineConstants>$(DefineConstants);DEBUG;TRACE</DefineConstants>
</PropertyGroup>


<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
<DebugType>Full</DebugType>
<DebugSymbols>True</DebugSymbols>
<SignAssembly>True</SignAssembly>
<DelaySign>true</DelaySign>
<AssemblyOriginatorKeyFile>..\FhirNetApi.publickey</AssemblyOriginatorKeyFile>
<IncludeSymbols>True</IncludeSymbols>
<GeneratePackageOnBuild>False</GeneratePackageOnBuild>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
<NoWarn>1591</NoWarn> <!-- Missing XML comments -->
</PropertyGroup>
<PropertyGroup Condition=" '$(TargetFramework)' != 'netstandard1.1' ">
<DefineConstants>$(DefineConstants)</DefineConstants>
</PropertyGroup>

<!-- Compiler settings -->
<PropertyGroup>
<LangVersion>9.0</LangVersion>
<GenerateDocumentationFile>True</GenerateDocumentationFile>
<Configurations>Debug;Release;FullDebug</Configurations>
</PropertyGroup>

<PropertyGroup Condition=" '$(Configuration)' == 'Debug' Or '$(Configuration)' == 'FullDebug' ">
<DebugType>portable</DebugType>
<DebugSymbols>True</DebugSymbols>
<NoWarn>1591</NoWarn>
<Optimize>false</Optimize>
<DefineConstants>$(DefineConstants);DEBUG;TRACE</DefineConstants>
</PropertyGroup>


<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
<SignAssembly>True</SignAssembly>
<DelaySign>true</DelaySign>
<AssemblyOriginatorKeyFile>..\FhirNetApi.publickey</AssemblyOriginatorKeyFile>
<IncludeSymbols>True</IncludeSymbols>
<GeneratePackageOnBuild>False</GeneratePackageOnBuild>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
<NoWarn>1591</NoWarn> <!-- Missing XML comments -->
</PropertyGroup>
</Project>

Loading