Skip to content

Commit ae54710

Browse files
committed
use .net10 sdk with 9 targets
1 parent 85bc40b commit ae54710

File tree

10 files changed

+20
-10
lines changed

10 files changed

+20
-10
lines changed

Directory.Packages.props

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
</Choose>
2323
<ItemGroup Label="CVE Mitigation">
2424
<!--Please include the CGA id if possible-->
25+
<PackageVersion Include="Medino.Extensions.DependencyInjection" Version="3.0.2" />
2526
<PackageVersion Include="System.Security.Cryptography.Xml" Version="$(DotNetSdkPackageVersion)" />
2627
<!--CVE-2023-29331-->
2728
<PackageVersion Include="System.Security.Cryptography.Pkcs" Version="$(DotNetSdkPackageVersion)" />
@@ -140,4 +141,4 @@
140141
<PackageVersion Include="Moq" Version="4.20.69" />
141142
<PackageVersion Include="System.Text.RegularExpressions" Version="4.3.1" />
142143
</ItemGroup>
143-
</Project>
144+
</Project>

build/build-variables.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ variables:
55
buildConfiguration: 'Release'
66
publicDockerImagePlatforms: 'linux/amd64,linux/arm64'
77
testDockerImagePlatforms: 'linux/amd64'
8+
# Use .NET 10 SDK to support SQL script generation tool, target net9.0 (temporary until upgrading to .net10)
89
defaultBuildFramework: 'net9.0'
910
azureSubscriptionEndpoint: 'docker-build'
1011
azureContainerRegistryName: 'healthplatformregistry'

build/docker/Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# --platform tells docker to always use the host platform for the build not the target platform. Runtime container will use target platform.
2-
FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:9.0.307-azurelinux3.0 AS build
2+
# Use .NET 10 SDK to support SQL script generation tool, but target net9.0 in builds (temporary until upgrading to .net10)
3+
FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:10.0.100-azurelinux3.0 AS build
34
ARG TARGETARCH
45
ARG FHIR_VERSION
56
ARG ASSEMBLY_VER

build/dotnet9-compat/global.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"sdk": {
3+
"version": "9.0.307"
4+
}
5+
}

global.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
22
"sdk": {
3-
"version": "9.0.307"
3+
"version": "10.0.100"
44
}
55
}

src/Microsoft.Health.Fhir.R4.Api/Microsoft.Health.Fhir.R4.Api.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
<PackageReference Include="Hl7.Fhir.R4" />
1616
<PackageReference Include="Hl7.Fhir.Specification.Data.R4" PrivateAssets="build;analyzers" />
1717
<PackageReference Include="Medino" />
18+
<PackageReference Include="Medino.Extensions.DependencyInjection" />
1819
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" />
1920
<PackageReference Include="Microsoft.Extensions.Http.Polly" />
2021
</ItemGroup>

src/Microsoft.Health.Fhir.R4B.Api/Microsoft.Health.Fhir.R4B.Api.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
<PackageReference Include="Hl7.Fhir.R4B" />
1313
<PackageReference Include="Hl7.Fhir.Specification.Data.R4B" PrivateAssets="build;analyzers" />
1414
<PackageReference Include="Medino" />
15+
<PackageReference Include="Medino.Extensions.DependencyInjection" />
1516
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" />
1617
<PackageReference Include="Microsoft.Extensions.Http.Polly" />
1718
</ItemGroup>

src/Microsoft.Health.Fhir.R5.Api/Microsoft.Health.Fhir.R5.Api.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
<PackageReference Include="Hl7.Fhir.R5" />
1313
<PackageReference Include="Hl7.Fhir.Specification.Data.R5" PrivateAssets="build;analyzers" />
1414
<PackageReference Include="Medino" />
15+
<PackageReference Include="Medino.Extensions.DependencyInjection" />
1516
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" />
1617
<PackageReference Include="Microsoft.Extensions.Http.Polly" />
1718
</ItemGroup>

src/Microsoft.Health.Fhir.Shared.Api/Modules/MediationModule.cs

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
// Licensed under the MIT License (MIT). See LICENSE in the repo root for license information.
44
// -------------------------------------------------------------------------------------------------
55

6-
using System;
76
using System.Linq;
87
using EnsureThat;
98
using Medino;
9+
using Medino.Extensions.DependencyInjection;
1010
using Microsoft.Extensions.DependencyInjection;
1111
using Microsoft.Health.Extensions.DependencyInjection;
1212
using Microsoft.Health.Fhir.Core.Features.Conformance;
@@ -26,12 +26,10 @@ public void Load(IServiceCollection services)
2626
EnsureArg.IsNotNull(services, nameof(services));
2727

2828
// TODO: AddMedino extension method not available in Medino 3.0.2 - may need alternative registration
29-
// services.AddMedino(cfg =>
30-
// {
31-
// cfg.RegisterServicesFromAssemblies(KnownAssemblies.All);
32-
// cfg.AddBehavior(typeof(IPipelineBehavior<,>), typeof(RequestExceptionActionProcessorBehavior<,>));
33-
// cfg.AddBehavior(typeof(IPipelineBehavior<,>), typeof(RequestExceptionProcessorBehavior<,>));
34-
// });
29+
services.AddMedino(cfg =>
30+
{
31+
cfg.RegisterServicesFromAssemblies(KnownAssemblies.All);
32+
});
3533

3634
// Register ValidateBundlePreProcessor as a pipeline behavior
3735
// (Converted from IRequestPreProcessor which was removed in newer Medino versions)

src/Microsoft.Health.Fhir.Stu3.Api/Microsoft.Health.Fhir.Stu3.Api.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
<PackageReference Include="Hl7.Fhir.STU3" />
1919
<PackageReference Include="Hl7.Fhir.Specification.Data.Stu3" PrivateAssets="build;analyzers" />
2020
<PackageReference Include="Medino" />
21+
<PackageReference Include="Medino.Extensions.DependencyInjection" />
2122
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" />
2223
<PackageReference Include="Microsoft.Extensions.Http.Polly" />
2324
</ItemGroup>

0 commit comments

Comments
 (0)