Skip to content

Commit b73851a

Browse files
m-reddingscbedd
andauthored
Upgrade to .NET 9 (Azure#48424)
* initial changes * trying eng sys fix * update analyzer version * updates * tweaks * tweaks, cleanup, consistency * attempt * attempt 2 * testing * fix * install .net 9 to unblock generate_matrix * move the restore test recordings to below the installation of .net * correct the template yaml * keyvault fixes * fix keyvault ci * keyvault tests * fix snippet * attempt 3 at regenerating keyvault snippets... * try deleting aot proj * additional pipeline fixes --------- Co-authored-by: Scott Beddall <[email protected]>
1 parent 1b111b4 commit b73851a

File tree

79 files changed

+382
-121
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

79 files changed

+382
-121
lines changed

.config/dotnet-tools.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"isRoot": true,
44
"tools": {
55
"Azure.Sdk.Tools.SnippetGenerator": {
6-
"version": "1.0.0-dev.20230124.1",
6+
"version": "1.0.0-dev.20241213.1",
77
"commands": [
88
"snippet-generator"
99
]

common/Perf/Azure.Test.Perf/BatchPerfTest.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,10 @@ public BatchPerfTest(TOptions options) : base(options)
4848
}
4949
else
5050
{
51+
#if NETFRAMEWORK
5152
// Assume _transport is HttpWebRequestTransport (currently internal class)
5253
ServicePointManager.ServerCertificateValidationCallback = (message, cert, chain, errors) => true;
53-
54+
#endif
5455
_insecureTransport = transport;
5556
}
5657
}

common/SmokeTests/SmokeTest/SmokeTest.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
33
<OutputType>Exe</OutputType>
4-
<TargetFrameworks>net8.0;net6.0;net462</TargetFrameworks>
4+
<TargetFrameworks>net9.0;net8.0;net462</TargetFrameworks>
55
<LangVersion>11.0</LangVersion>
66
<NoWarn>$(NoWarn);NU1605</NoWarn>
77
</PropertyGroup>

eng/Directory.Build.Common.props

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,11 +143,11 @@
143143
<PropertyGroup Condition="'$(IsGeneratorLibrary)' != 'true' and ('$(IsTestProject)' == 'true' or '$(IsTestSupportProject)' == 'true' or '$(IsSamplesProject)' == 'true' or '$(IsPerfProject)' == 'true' or '$(IsStressProject)' == 'true')">
144144
<IsPackable>false</IsPackable>
145145
<!-- List newest targets first so that recordings are made with latest, running tests from editor runs latest, etc. -->
146-
<RequiredTargetFrameworks>net8.0;net6.0</RequiredTargetFrameworks>
146+
<RequiredTargetFrameworks>net9.0;net8.0;</RequiredTargetFrameworks>
147147
<!-- Also test net462 on Windows. net461 is out of support as of 4/2022 and is not supported in version 4.4.x and beyond of NUnit3TestAdapter. -->
148148
<RequiredTargetFrameworks Condition="'$(OS)' == 'Windows_NT'">$(RequiredTargetFrameworks);net462</RequiredTargetFrameworks>
149149
<!-- But only build snippets for the latest. -->
150-
<RequiredTargetFrameworks Condition="'$(BuildSnippets)' == 'true'">net8.0</RequiredTargetFrameworks>
150+
<RequiredTargetFrameworks Condition="'$(BuildSnippets)' == 'true'">net9.0</RequiredTargetFrameworks>
151151
</PropertyGroup>
152152

153153
<ItemGroup Condition="'$(IsMgmtSubLibrary)' == 'true' and !$(MSBuildProjectName.Equals('Azure.ResourceManager.Tests'))">

eng/Packages.Data.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@
250250
<PackageReference Update="Microsoft.Azure.AutoRest.CSharp" Version="3.0.0-beta.20250223.1" PrivateAssets="All" />
251251
<PackageReference Update="Azure.ClientSdk.Analyzers" Version="0.1.1-dev.20250227.2" PrivateAssets="All" />
252252
<PackageReference Update="coverlet.collector" Version="3.2.0" PrivateAssets="All" />
253-
<PackageReference Update="Microsoft.CodeAnalysis.NetAnalyzers" Version="8.0.0" PrivateAssets="All" />
253+
<PackageReference Update="Microsoft.CodeAnalysis.NetAnalyzers" Version="9.0.0" PrivateAssets="All" />
254254
<PackageReference Update="Microsoft.CodeAnalysis.BannedApiAnalyzers" Version="3.3.2" PrivateAssets="All" />
255255
<PackageReference Update="Microsoft.DotNet.ApiCompat" Version="5.0.0-beta.20467.1" PrivateAssets="All" />
256256
<PackageReference Update="Microsoft.DotNet.GenAPI" Version="5.0.0-beta.19552.1" PrivateAssets="All" />

eng/containers/UbuntuNetCoreKeyring/Dockerfile

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@ ENV \
99
DOTNET_GENERATE_ASPNET_CERTIFICATE=false \
1010
# SDK version
1111
DOTNET_SDK_VERSION_8_0=8.0.405\
12-
DOTNET_SDK_VERSION_6_0=6.0.413 \
13-
DOTNET_SDK_VERSION_3_1=3.1.416 \
1412
# Enable correct mode for dotnet watch (only mode supported in a container)
1513
DOTNET_USE_POLLING_FILE_WATCHER=true \
1614
# Skip extraction of XML docs - generally not useful within an image/container - helps performance

eng/pipelines/templates/jobs/ci.tests.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,10 @@ jobs:
120120
- ${{ each pair in step }}:
121121
${{ pair.key }}: ${{ pair.value }}
122122

123+
- template: /eng/pipelines/templates/steps/install-dotnet.yml
124+
parameters:
125+
NuGetCacheKey: Test
126+
123127
# this section is only included when invoking with a dynamic set of packages (EG net - pullrequest)
124128
- ${{ if and(eq(variables['Build.Reason'], 'PullRequest'), eq(parameters.ServiceDirectory, 'auto')) }}:
125129
- template: /eng/pipelines/templates/steps/set-artifact-packages.yml
@@ -134,10 +138,6 @@ jobs:
134138
displayName: Install Azurite If Necessary
135139
condition: ne(variables['ProjectNames'], '')
136140
137-
- template: /eng/pipelines/templates/steps/install-dotnet.yml
138-
parameters:
139-
NuGetCacheKey: Test
140-
141141
# ProjectListOverrideFile is set by the customization within dependency.tests.yml
142142
# OR it is set by the PR built to target a set of packages outside of a single target service directory.
143143
# if it is unset, then we are in a traditional service directory build.

eng/pipelines/templates/jobs/ci.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -405,6 +405,8 @@ jobs:
405405
echo "##vso[task.setvariable variable=DISCOVER_DEPENDENT_PACKAGES]1"
406406
displayName: Enable AdditionalDependency Calculation
407407
408+
- template: /eng/pipelines/templates/steps/install-dotnet.yml
409+
408410
- template: /eng/common/pipelines/templates/steps/save-package-properties.yml
409411
parameters:
410412
ServiceDirectory: ${{parameters.ServiceDirectory}}

eng/pipelines/templates/jobs/smoke-test-matrix.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"OSVmImage": "env:WINDOWSVMIMAGE"
77
}
88
},
9-
"TestTargetFramework": ["net462", "net6.0", "net8.0"]
9+
"TestTargetFramework": ["net462", "net8.0", "net9.0"]
1010
}
1111
"include": [
1212
{
@@ -16,7 +16,7 @@
1616
"OSVmImage": "env:LINUXVMIMAGE"
1717
}
1818
},
19-
"TestTargetFramework": "net6.0"
19+
"TestTargetFramework": "net8.0"
2020
}
2121
]
2222
}

eng/pipelines/templates/stages/platform-matrix.json

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@
55
},
66
"matrix": {
77
"Agent": {
8-
"Ubuntu-20.04_NET6.0": {
8+
"Ubuntu-20.04_NET8.0": {
99
"OSVmImage": "env:LINUXVMIMAGE",
1010
"Pool": "env:LINUXPOOL",
11-
"TestTargetFramework": "net6.0"
11+
"TestTargetFramework": "net8.0"
1212
},
13-
"Ubuntu-20.04_NET8.0": {
13+
"Ubuntu-20.04_NET9.0": {
1414
"OSVmImage": "env:LINUXVMIMAGE",
1515
"Pool": "env:LINUXPOOL",
16-
"TestTargetFramework": "net8.0"
16+
"TestTargetFramework": "net9.0"
1717
},
1818
"Windows2022_NET462": {
1919
"OSVmImage": "env:WINDOWSVMIMAGE",
@@ -25,15 +25,15 @@
2525
"Pool": "env:WINDOWSPOOL",
2626
"TestTargetFramework": "net8.0"
2727
},
28-
"MacOS_NET6.0": {
28+
"MacOS_NET8.0": {
2929
"OSVmImage": "env:MACVMIMAGE",
3030
"Pool": "env:MACPOOL",
31-
"TestTargetFramework": "net6.0"
31+
"TestTargetFramework": "net8.0"
3232
},
33-
"MacOS_NET8.0": {
33+
"MacOS_NET9.0": {
3434
"OSVmImage": "env:MACVMIMAGE",
3535
"Pool": "env:MACPOOL",
36-
"TestTargetFramework": "net8.0"
36+
"TestTargetFramework": "net9.0"
3737
}
3838
},
3939
"AdditionalTestArguments": [
@@ -48,10 +48,10 @@
4848
"include": [
4949
{
5050
"Agent": {
51-
"Windows2022_NET8.0": {
51+
"Windows2022_NET9.0": {
5252
"OSVmImage": "env:WINDOWSVMIMAGE",
5353
"Pool": "env:WINDOWSPOOL",
54-
"TestTargetFramework": "net8.0"
54+
"TestTargetFramework": "net9.0"
5555
}
5656
},
5757
"TestMode": {
@@ -63,4 +63,4 @@
6363
"AdditionalTestArguments": "/p:UseProjectReferenceToAzureClients=false"
6464
}
6565
]
66-
}
66+
}

0 commit comments

Comments
 (0)