Skip to content

Commit b314648

Browse files
pakrymheaths
andauthored
netcoreapp3.1 migration (Azure#22545)
Co-authored-by: Heath Stewart <heaths@outlook.com>
1 parent ba60ca6 commit b314648

File tree

35 files changed

+50
-66
lines changed

35 files changed

+50
-66
lines changed

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>netcoreapp2.1;net461;net5.0</TargetFrameworks>
4+
<TargetFrameworks>netcoreapp3.1;net461;net5.0</TargetFrameworks>
55
<LangVersion>latest</LangVersion>
66
<StartupObject>SmokeTest.Program</StartupObject>
77
</PropertyGroup>

eng/Directory.Build.Common.props

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -107,16 +107,16 @@
107107

108108
<PropertyGroup Condition="'$(IsTestProject)' == 'true' or '$(IsTestSupportProject)' == 'true' or '$(IsSamplesProject)' == 'true'">
109109
<IsPackable>false</IsPackable>
110-
<RequiredTargetFrameworks>netcoreapp2.1;net5.0</RequiredTargetFrameworks>
111-
<!-- Also test net461 on Windows; it's listed first so that coverage reports are for netcoreapp2.1 (the "primary"). -->
112-
<RequiredTargetFrameworks Condition="'$(OS)' == 'Windows_NT'">net461;netcoreapp2.1;net5.0</RequiredTargetFrameworks>
110+
<RequiredTargetFrameworks>netcoreapp3.1;net5.0</RequiredTargetFrameworks>
111+
<!-- Also test net461 on Windows; it's listed first so that coverage reports are for netcoreapp3.1 (the "primary"). -->
112+
<RequiredTargetFrameworks Condition="'$(OS)' == 'Windows_NT'">net461;netcoreapp3.1;net5.0</RequiredTargetFrameworks>
113113
</PropertyGroup>
114114

115115
<PropertyGroup Condition="'$(IsPerfProject)' == 'true' or '$(IsStressProject)' == 'true'">
116116
<IsPackable>false</IsPackable>
117-
<RequiredTargetFrameworks>netcoreapp2.1;netcoreapp3.1;net5.0</RequiredTargetFrameworks>
118-
<!-- Also test net461 on Windows; it's listed first so that coverage reports are for netcoreapp2.1 (the "primary"). -->
119-
<RequiredTargetFrameworks Condition="'$(OS)' == 'Windows_NT'">net461;netcoreapp2.1;netcoreapp3.1;net5.0</RequiredTargetFrameworks>
117+
<RequiredTargetFrameworks>netcoreapp3.1;net5.0</RequiredTargetFrameworks>
118+
<!-- Also test net461 on Windows; it's listed first so that coverage reports are for netcoreapp3.1 (the "primary"). -->
119+
<RequiredTargetFrameworks Condition="'$(OS)' == 'Windows_NT'">net461;netcoreapp3.1;net5.0</RequiredTargetFrameworks>
120120
</PropertyGroup>
121121

122122
<ItemGroup Condition="'$(IsMgmtLibrary)' == 'true'">

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -50,21 +50,21 @@ jobs:
5050
Linux (AzureCloud):
5151
Pool: "azsdk-pool-mms-ubuntu-2004-general"
5252
OSVmImage: "MMSUbuntu20.04"
53-
TestTargetFramework: netcoreapp2.1
53+
TestTargetFramework: netcoreapp3.1
5454
SubscriptionConfiguration: $(sub-config-azure-cloud-test-resources)
5555
ArmTemplateParameters: $(azureCloudArmParameters)
5656
Location: "westus"
5757
Linux (AzureCloud Canary):
5858
Pool: "azsdk-pool-mms-ubuntu-2004-general"
5959
OSVmImage: "MMSUbuntu20.04"
60-
TestTargetFramework: netcoreapp2.1
60+
TestTargetFramework: netcoreapp3.1
6161
SubscriptionConfiguration: $(sub-config-azure-cloud-test-resources-preview)
6262
ArmTemplateParameters: $(azureCloudArmParameters)
6363
Location: "eastus2euap"
6464
Windows_NetCoreApp (AzureCloud):
6565
Pool: "azsdk-pool-mms-win-2019-general"
6666
OSVmImage: "MMS2019"
67-
TestTargetFramework: netcoreapp2.1
67+
TestTargetFramework: netcoreapp3.1
6868
SubscriptionConfiguration: $(sub-config-azure-cloud-test-resources)
6969
ArmTemplateParameters: $(azureCloudArmParameters)
7070
Location: "westus"
@@ -78,7 +78,7 @@ jobs:
7878
MacOs (AzureCloud):
7979
Pool: Azure Pipelines
8080
OSVmImage: "macOS-10.15"
81-
TestTargetFramework: netcoreapp2.1
81+
TestTargetFramework: netcoreapp3.1
8282
SubscriptionConfiguration: $(sub-config-azure-cloud-test-resources)
8383
ArmTemplateParameters: $(azureCloudArmParameters)
8484
Location: "westus"
@@ -92,7 +92,7 @@ jobs:
9292
Windows_NetCoreApp (AzureUSGovernment):
9393
Pool: "azsdk-pool-mms-win-2019-general"
9494
OSVmImage: "MMS2019"
95-
TestTargetFramework: netcoreapp2.1
95+
TestTargetFramework: netcoreapp3.1
9696
SubscriptionConfiguration: $(sub-config-gov-test-resources)
9797
ArmTemplateParameters: $(azureUSGovernmentArmParameters)
9898
Location: "usgovarizona"
@@ -106,7 +106,7 @@ jobs:
106106
Windows_NetCoreApp (AzureChinaCloud):
107107
Pool: "azsdk-pool-mms-win-2019-general"
108108
OSVmImage: "MMS2019"
109-
TestTargetFramework: netcoreapp2.1
109+
TestTargetFramework: netcoreapp3.1
110110
SubscriptionConfiguration: $(sub-config-cn-test-resources)
111111
ArmTemplateParameters: $(azureChinaCloudArmParameters)
112112
Location: "chinaeast2"

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
}
2020
},
2121
"TestTargetFramework": [
22-
"netcoreapp2.1",
22+
"netcoreapp3.1",
2323
"net461",
2424
"net5.0"
2525
],
@@ -40,7 +40,7 @@
4040
"netcoreapp21_Coverage_Record": {
4141
"SupportsRecording": true,
4242
"CollectCoverage": true,
43-
"TestTargetFramework": "netcoreapp2.1"
43+
"TestTargetFramework": "netcoreapp3.1"
4444
},
4545
"net5.0": {
4646
"TestTargetFramework": "net5.0"

eng/pipelines/templates/steps/install-dotnet.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ steps:
1212
performMultiLevelLookup: true
1313
- task: UseDotNet@2
1414
condition: ne(variables['Agent.OS'], 'Windows_NT') # Windows supports MultiLevelLookup and doesn't need explicit framework installation
15-
displayName: 'Use .NET Core 2.1 runtime'
15+
displayName: 'Use .NET Core 3.1 runtime'
1616
inputs:
1717
packageType: runtime
18-
version: "2.1.x"
18+
version: "3.1.x"
1919
- task: Cache@2
2020
inputs:
2121
key: 'nuget | "$(Agent.OS)" | $(Build.SourcesDirectory)/eng/Packages.Data.props | ${{parameters.NuGetCacheKey}}'

eng/scripts/dependencies/azure-sdk.deps.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
3-
<TargetFramework>netcoreapp2.1</TargetFramework>
3+
<TargetFramework>netcoreapp3.1</TargetFramework>
44
<OutputType>Exe</OutputType>
55
<EnableDefaultItems>false</EnableDefaultItems>
66
<!--

samples/CloudClipboard/CloudClipboard/CloudClipboard.csproj

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
11
<Project Sdk="Microsoft.NET.Sdk.Web">
22

33
<PropertyGroup>
4-
<TargetFramework>netcoreapp2.1</TargetFramework>
4+
<TargetFramework>netcoreapp3.1</TargetFramework>
55
<LangVersion>preview</LangVersion>
66
</PropertyGroup>
77

88
<ItemGroup>
99
<PackageReference Include="Azure.Identity" Version="1.3.0" />
1010
<PackageReference Include="Azure.Storage.Blobs" Version="12.7.0" />
11-
<PackageReference Include="Microsoft.AspNetCore.App" />
12-
<PackageReference Include="Microsoft.AspNetCore.Razor.Design" Version="2.1.2" PrivateAssets="All" />
1311
<PackageReference Include="Microsoft.Azure.Services.AppAuthentication" Version="1.6.0" />
1412
<PackageReference Include="Microsoft.Azure.Storage.Blob" Version="11.2.2" />
1513
<PackageReference Include="Microsoft.Extensions.Azure" Version="1.0.0" />

sdk/appconfiguration/CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ Properly supporting recorded tests does require a few extra considerations. All
4848

4949
The easiest way to run the tests is via Visual Studio's unit test runner.
5050

51-
You can also run tests via the command line using `dotnet test`, but that will run tests for all supported platforms simultaneously and intermingle their output. You can run the tests for just one platform with `dotnet test -f netcoreapp2.1` or `dotnet test -f net461`.
51+
You can also run tests via the command line using `dotnet test`, but that will run tests for all supported platforms simultaneously and intermingle their output. You can run the tests for just one platform with `dotnet test -f netcoreapp3.1` or `dotnet test -f net461`.
5252

5353
The recorded tests are run automatically on every pull request. Live tests are run nightly. Contributors with write access can ask Azure DevOps to run the live tests against a pull request by commenting `/azp run net - appconfiguration - tests` in the PR.
5454

sdk/core/Azure.Core.Experimental/tests/JsonDataDynamicMutableTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ public static IEnumerable<object[]> PrimitiveValues()
114114
yield return new object[] {1L, "1"};
115115
yield return new object[] {1, "1"};
116116
yield return new object[] {1.0, "1"};
117-
#if NET5_0
117+
#if NETCOREAPP
118118
yield return new object[] {1.1D, "1.1"};
119119
yield return new object[] {1.1F, "1.100000023841858"};
120120
#else

sdk/core/Azure.Core.TestFramework/README.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -240,8 +240,6 @@ public class ConfigurationLiveTests: RecordedTestBase<AppConfigurationTestEnviro
240240

241241
When tests are run in recording mode, session records are saved to the project directory automatically in a folder named 'SessionRecords'.
242242

243-
__NOTE:__ recordings are copied from `netcoreapp2.1` directory by default, make sure you are running the right target framework.
244-
245243
### Sanitizing
246244

247245
Secrets that are part of requests, responses, headers, or connections strings should be sanitized before saving the record.

0 commit comments

Comments
 (0)