Skip to content

Commit 8991b52

Browse files
committed
Min .net10 upgrade
1 parent 5016f0d commit 8991b52

File tree

9 files changed

+28
-14
lines changed

9 files changed

+28
-14
lines changed

CustomAnalysisRules.ruleset

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,13 @@
2424
<Rule Id="CA1805" Action="Info" />
2525
<Rule Id="CA1860" Action="Info" />
2626
<Rule Id="CA1863" Action="Info" />
27+
<Rule Id="CA1873" Action="None" />
28+
<Rule Id="CA2024" Action="None" />
29+
<Rule Id="CA2025" Action="None" />
30+
<Rule Id="ASPDEPR008" Action="None" />
31+
<Rule Id="ASPDEPR006" Action="None" />
32+
<Rule Id="ASPDEPR003" Action="None" />
33+
<Rule Id="ASPDEPR005" Action="None" />
2734
</Rules>
2835
<Rules AnalyzerId="Microsoft.CodeQuality.Analyzers" RuleNamespace="Microsoft.CodeQuality.Analyzers">
2936
<Rule Id="CA1054" Action="Info" />

Directory.Build.props

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@
1313
<HighEntropyVA>true</HighEntropyVA>
1414
<LangVersion>latest</LangVersion>
1515
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
16-
<NoWarn>$(NoWarn);NU5104;CS1574;IDE0005</NoWarn>
16+
<NoWarn>$(NoWarn);NU5104;NU1510;CS1574;IDE0005;ASPDEPR008;ASPDEPR006;ASPDEPR003;ASPDEPR005;CA2024</NoWarn>
1717
<PackageLicenseExpression>MIT</PackageLicenseExpression>
1818
<Product>Microsoft FHIR Server for Azure</Product>
1919
<PublishRepositoryUrl>true</PublishRepositoryUrl>
2020
<RepositoryUrl>https://github.com/microsoft/fhir-server</RepositoryUrl>
2121
<RunSettingsFilePath>$(MSBuildThisFileDirectory)\CodeCoverage.runsettings</RunSettingsFilePath>
22-
<TargetFrameworks>net9.0;net8.0</TargetFrameworks>
22+
<TargetFrameworks>net10.0;net8.0</TargetFrameworks>
2323
<TargetLatestRuntimePatch>true</TargetLatestRuntimePatch>
2424
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
2525
<WarningsAsErrors />

Directory.Packages.props

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<HealthcareSharedPackageVersion>11.0.3</HealthcareSharedPackageVersion>
55
<Hl7FhirVersion>5.11.4</Hl7FhirVersion>
66
<Hl7FhirLegacyVersion>5.11.0</Hl7FhirLegacyVersion>
7-
<DotNetSdkPackageVersion>9.0.11</DotNetSdkPackageVersion>
7+
<DotNetSdkPackageVersion>10.0.0</DotNetSdkPackageVersion>
88
<OpenIddictPackageVersion>6.2.0</OpenIddictPackageVersion>
99
</PropertyGroup>
1010
<!-- SDK Packages -->
@@ -19,6 +19,11 @@
1919
<AspNetPackageVersion>9.0.3</AspNetPackageVersion>
2020
</PropertyGroup>
2121
</When>
22+
<When Condition="'$(TargetFramework)' == 'net10.0'">
23+
<PropertyGroup>
24+
<AspNetPackageVersion>10.0.0</AspNetPackageVersion>
25+
</PropertyGroup>
26+
</When>
2227
</Choose>
2328
<ItemGroup Label="CVE Mitigation">
2429
<!--Please include the CGA id if possible-->

build/build-variables.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ 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)
9-
defaultBuildFramework: 'net9.0'
8+
# Use .NET 10 SDK to support SQL script generation tool, target net10.0
9+
defaultBuildFramework: 'net10.0'
1010
azureSubscriptionEndpoint: 'docker-build'
1111
azureContainerRegistryName: 'healthplatformregistry'
1212
azureContainerRegistry: '$(azureContainerRegistryName).azurecr.io'

build/ci-pipeline.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ stages:
6565
majorMinorPatch: $[stageDependencies.UpdateVersion.Semver.outputs['SetVariablesFromGitVersion.majorMinorPatch']]
6666
nuGetVersion: $[stageDependencies.UpdateVersion.Semver.outputs['SetVariablesFromGitVersion.nuGetVersion']]
6767
jobs:
68-
- job: Windows_dotnet9
68+
- job: Windows_dotnet10
6969
pool:
7070
name: '$(DefaultWindowsPool)'
7171
demands:

build/docker/Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# --platform tells docker to always use the host platform for the build not the target platform. Runtime container will use target platform.
2-
# Use .NET 10 SDK to support SQL script generation tool, but target net9.0 in builds (temporary until upgrading to .net10)
2+
# Use .NET 10 SDK to support SQL script generation tool, targeting net10.0 and net8.0 in builds
33
FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:10.0.100-azurelinux3.0 AS build
44
ARG TARGETARCH
55
ARG FHIR_VERSION
@@ -78,10 +78,10 @@ RUN dotnet restore ./src/Microsoft.Health.Fhir.${FHIR_VERSION}.Web/Microsoft.Hea
7878

7979
COPY . .
8080

81-
RUN dotnet publish /repo/src/Microsoft.Health.Fhir.${FHIR_VERSION}.Web/Microsoft.Health.Fhir.${FHIR_VERSION}.Web.csproj -o "/build" --no-restore -p:AssemblyVersion="${ASSEMBLY_VER}" -p:FileVersion="${ASSEMBLY_VER}" -p:Version="${ASSEMBLY_VER}" -f net9.0 -a $TARGETARCH
81+
RUN dotnet publish /repo/src/Microsoft.Health.Fhir.${FHIR_VERSION}.Web/Microsoft.Health.Fhir.${FHIR_VERSION}.Web.csproj -o "/build" --no-restore -p:AssemblyVersion="${ASSEMBLY_VER}" -p:FileVersion="${ASSEMBLY_VER}" -p:Version="${ASSEMBLY_VER}" -f net10.0 -a $TARGETARCH
8282

8383
# Implicitly uses the target platform for the runtime image.
84-
FROM mcr.microsoft.com/dotnet/aspnet:9.0.10-azurelinux3.0 AS runtime
84+
FROM mcr.microsoft.com/dotnet/aspnet:10.0.0-azurelinux3.0 AS runtime
8585

8686
ARG FHIR_VERSION
8787

build/jobs/analyze.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ steps:
110110
inputs:
111111
userProvideBuildInfo: 'msBuildInfo'
112112
msBuildArchitecture: 'DotNetCore'
113-
msBuildCommandline: 'dotnet build $(Build.SourcesDirectory)/Microsoft.Health.Fhir.sln --configuration $(buildConfiguration) -p:ContinuousIntegrationBuild=true -f net9.0'
113+
msBuildCommandline: 'dotnet build $(Build.SourcesDirectory)/Microsoft.Health.Fhir.sln --configuration $(buildConfiguration) -p:ContinuousIntegrationBuild=true -f net10.0'
114114

115115
- task: BinSkim@4
116116
inputs:

build/pr-pipeline.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ stages:
3737
majorMinorPatch: $[stageDependencies.UpdateVersion.Semver.outputs['SetVariablesFromGitVersion.majorMinorPatch']]
3838
nuGetVersion: $[stageDependencies.UpdateVersion.Semver.outputs['SetVariablesFromGitVersion.nuGetVersion']]
3939
jobs:
40-
- job: Windows_dotnet9
40+
- job: Windows_dotnet10
4141
pool:
4242
name: '$(DefaultWindowsPool)'
4343
demands:

src/Microsoft.Health.Fhir.CosmosDb.Initialization/Features/Storage/ResourceManagerCollectionSetup.cs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -186,9 +186,11 @@ public async Task InstallStoredProcs(CancellationToken cancellationToken)
186186
CosmosDBSqlContainerResource containerResponse = await Database.GetCosmosDBSqlContainers().GetAsync(CollectionId, cancellationToken);
187187
CosmosDBSqlStoredProcedureCollection cosmosDbSqlStoredProcedures = containerResponse.GetCosmosDBSqlStoredProcedures();
188188

189-
var existing = cosmosDbSqlStoredProcedures
190-
.Select(x => x.Data.Resource.StoredProcedureName)
191-
.ToList();
189+
var existing = new List<string>();
190+
await foreach (var item in cosmosDbSqlStoredProcedures.WithCancellation(cancellationToken))
191+
{
192+
existing.Add(item.Data.Resource.StoredProcedureName);
193+
}
192194

193195
var storedProcsNeedingInstall = _storeProceduresMetadata
194196
.Where(storedProc => !existing.Contains(storedProc.FullName))

0 commit comments

Comments
 (0)