Skip to content

Commit c98ed81

Browse files
pakrymchristothes
andauthored
.NET 6 testing (Azure#24260)
Co-authored-by: Christopher Scott <chriss@microsoft.com>
1 parent e01b508 commit c98ed81

File tree

118 files changed

+270
-502
lines changed

Some content is hidden

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

118 files changed

+270
-502
lines changed

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
- Install VS 2019 (Community or higher) and make sure you have the latest updates (https://www.visualstudio.com/).
1010
- Need at least .NET Framework 4.6.1 and 4.7 development tools
1111
- Install the **.NET Core cross-platform development** workloads in VisualStudio
12-
- Install **.NET Core 5.0.301 SDK** for your specific platform. (or a higher version within the 5.0.*** band) (https://dotnet.microsoft.com/download/dotnet-core/5.0)
12+
- Install **.NET Core 6.0.100 SDK** for your specific platform. (or a higher version within the 6.0.*** band) (https://dotnet.microsoft.com/download/dotnet-core/6.0)
1313
- Install the latest version of git (https://git-scm.com/downloads)
1414
- Install [PowerShell](https://docs.microsoft.com/powershell/scripting/install/installing-powershell), version 6 or higher, if you plan to make public API changes or are working with generated code snippets.
1515
- Install [NodeJS](https://nodejs.org/) (14.x.x) if you plan to use [C# code generation](https://github.com/Azure/autorest.csharp).

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

doc/ApiDocGeneration/assets/docgen.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-
<TargetFrameworks>netcoreapp2.0</TargetFrameworks>
3+
<TargetFrameworks>netcoreapp3.1</TargetFrameworks>
44
<Description>This is a dummy project used to restore nuget packages used for doc generation</Description>
55
<AssemblyTitle>Doc generation Packages</AssemblyTitle>
66
</PropertyGroup>

eng/Directory.Build.Common.props

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,16 @@
2424

2525
<!-- Setup default project properties -->
2626
<PropertyGroup>
27-
<LangVersion>latest</LangVersion>
27+
<LangVersion>9</LangVersion>
2828
<!--
2929
Disable NU5105 NuGet Pack warning that the version is SemVer 2.0.
3030
SemVer 2.0 is supported by NuGet since 3.0.0 (July 2015) in some capacity, and fully since 3.5.0 (October 2016).
3131
-->
3232
<NoWarn>$(NoWarn);NU5105</NoWarn>
33+
<!--
34+
https://github.com/dotnet/roslyn-analyzers/issues/5628
35+
-->
36+
<NoWarn>$(NoWarn);CA1812</NoWarn>
3337
<!--
3438
Disable some FxCop rules
3539
-->
@@ -117,18 +121,11 @@
117121
<RequiredTargetFrameworks Condition="'$(SupportsNetStandard20)' == 'true'">netstandard2.0</RequiredTargetFrameworks>
118122
</PropertyGroup>
119123

120-
<PropertyGroup Condition="'$(IsTestProject)' == 'true' or '$(IsTestSupportProject)' == 'true' or '$(IsSamplesProject)' == 'true'">
121-
<IsPackable>false</IsPackable>
122-
<RequiredTargetFrameworks>netcoreapp3.1;net5.0</RequiredTargetFrameworks>
123-
<!-- Also test net461 on Windows; it's listed first so that coverage reports are for netcoreapp3.1 (the "primary"). -->
124-
<RequiredTargetFrameworks Condition="'$(OS)' == 'Windows_NT'">net461;netcoreapp3.1;net5.0</RequiredTargetFrameworks>
125-
</PropertyGroup>
126-
127-
<PropertyGroup Condition="'$(IsPerfProject)' == 'true' or '$(IsStressProject)' == 'true'">
124+
<PropertyGroup Condition="'$(IsTestProject)' == 'true' or '$(IsTestSupportProject)' == 'true' or '$(IsSamplesProject)' == 'true' or '$(IsPerfProject)' == 'true' or '$(IsStressProject)' == 'true'">
128125
<IsPackable>false</IsPackable>
129-
<RequiredTargetFrameworks>netcoreapp3.1;net5.0</RequiredTargetFrameworks>
126+
<RequiredTargetFrameworks>netcoreapp3.1;net6.0</RequiredTargetFrameworks>
130127
<!-- Also test net461 on Windows; it's listed first so that coverage reports are for netcoreapp3.1 (the "primary"). -->
131-
<RequiredTargetFrameworks Condition="'$(OS)' == 'Windows_NT'">net461;netcoreapp3.1;net5.0</RequiredTargetFrameworks>
128+
<RequiredTargetFrameworks Condition="'$(OS)' == 'Windows_NT'">net461;netcoreapp3.1;net6.0</RequiredTargetFrameworks>
132129
</PropertyGroup>
133130

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

eng/mgmt/AzSdk.test.reference.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
22
<PropertyGroup>
3-
<TargetFrameworks>netcoreapp2.0</TargetFrameworks>
3+
<TargetFrameworks>netcoreapp3.1</TargetFrameworks>
44
</PropertyGroup>
55
<ItemGroup>
66
<PackageReference Include="Microsoft.Azure.Test.HttpRecorder" Version="[1.13.3, 2.0.0)" />

eng/mgmt/Directory.Build.Mgmt.props

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
<PkgVersion>0.12.0-dev.20210827.1</PkgVersion>
44
<PkgLocalDir>$(NuGetPackageRoot)\microsoft.internal.netsdkbuild.mgmt.tools\$(PkgVersion)\Sdk</PkgLocalDir>
55
<SymbolPackageFormat>symbols.nupkg</SymbolPackageFormat>
6+
<NoWarn>$(NoWarn);NETSDK1138</NoWarn>
67
</PropertyGroup>
78

89
<!-- during execution of tasks tests, this conditional import will satisfy the import resolution. And you will have to manually execute a target to restore the package

eng/pipelines/mgmt.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ variables:
173173
- name: msBuildLogDir
174174
value: msbuildlogs
175175
- name: loggingArgs
176-
value: /clp:ShowtimeStamp /flp:LogFile=$(msBuildLogDir)/msbuild.normal.log;Verbosity=normal /flp1:Summary;Verbosity=minimal;LogFile=$(msBuildLogDir)/msbuild.sum.log /flp2:warningsonly;logfile=$(msBuildLogDir)/msbuild.wrn.log /flp3:errorsonly;logfile=$(msBuildLogDir)/msbuild.err.log
176+
value: /clp:ShowtimeStamp /flp:Summary;Verbosity=minimal;LogFile=$(msBuildLogDir)/msbuild.sum.log /flp1:warningsonly;logfile=$(msBuildLogDir)/msbuild.wrn.log /flp2:errorsonly;logfile=$(msBuildLogDir)/msbuild.err.log
177177
- name: RPScopeArgs
178178
value: /p:PullRequestNumber=$(system.pullrequest.pullrequestnumber) /p:RepoHtmlUrl=https://github.com/$(build.repository.id) /p:CIBuildId=$(OfficialBuildId)
179179
- name: timeoutInMinutes

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

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,11 @@ jobs:
22
- job: Build
33
timeoutInMinutes: 100
44
pool:
5-
vmImage: windows-2019
5+
name: azsdk-pool-mms-win-2019-general
6+
vmImage: MMS2019
67
steps:
78
#- script: "echo $(system.pullrequest.pullrequestnumber), https://github.com/$(build.repository.id), https://github.com/$(build.repository.ID)"
9+
- template: /eng/pipelines/templates/steps/install-dotnet.yml
810
- script: |
911
if "$(BuildConfiguration)" == "Release" (set SkipTests=true) else (set SkipTests=false)
1012
dotnet msbuild mgmt.proj /v:m /t:CreateNugetPackage /p:Configuration=$(BuildConfiguration) /p:SkipTests=%SkipTests% /p:PackageOutputPath=$(Build.ArtifactStagingDirectory) /p:Scope=${{parameters.Scope}} /p:ForPublishing=$(ShouldPublish) $(loggingArgs) $(RPScopeArgs)"
@@ -43,11 +45,11 @@ jobs:
4345
maxParallel: $[ variables['MaxParallelTestJobs'] ]
4446
matrix:
4547
Linux:
46-
Pool: Azure Pipelines
47-
OSVmImage: "ubuntu-20.04"
48+
Pool: azsdk-pool-mms-ubuntu-2004-general
49+
OSVmImage: "MMSUbuntu20.04"
4850
Windows:
49-
Pool: Azure Pipelines
50-
OSVmImage: "windows-2019"
51+
Pool: azsdk-pool-mms-win-2019-general
52+
OSVmImage: MMS2019
5153
MacOs:
5254
Pool: Azure Pipelines
5355
OSVmImage: "macOS-10.15"
@@ -59,6 +61,7 @@ jobs:
5961
parameters:
6062
AgentImage: $(OSVmImage)
6163
- script: "echo $(system.pullrequest.pullrequestnumber), http://github.com/$(build.repository.id), http://github.com/$(build.repository.ID)"
64+
- template: /eng/pipelines/templates/steps/install-dotnet.yml
6265
- script: "dotnet msbuild mgmt.proj /v:n /t:RunTests /p:Scope=${{parameters.Scope}} /p:ForPublishing=$(ShouldPublish) /clp:ShowtimeStamp $(RPScopeArgs)"
6366
displayName: "Build & Run Tests"
6467
- task: PublishTestResults@2
@@ -77,7 +80,8 @@ jobs:
7780
dependsOn:
7881
- Build
7982
pool:
80-
vmImage: windows-2019
83+
name: azsdk-pool-mms-win-2019-general
84+
vmImage: MMS2019
8185
steps:
8286
- task: UsePythonVersion@0
8387
displayName: "Use Python 3.6"

eng/pipelines/templates/jobs/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ jobs:
159159
inputs:
160160
command: custom
161161
custom: 'tool'
162-
arguments: 'install --global --add-source "https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-net/nuget/v3/index.json" --version "1.0.0-dev.20210730.3" "Azure.Sdk.Tools.SnippetGenerator"'
162+
arguments: 'install --global --add-source "https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-net/nuget/v3/index.json" --version "1.0.0-dev.20211119.1" "Azure.Sdk.Tools.SnippetGenerator"'
163163
workingDirectory: '$(Agent.BuildDirectory)'
164164
- task: PowerShell@2
165165
displayName: "Verify generated code"

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ jobs:
7878
Windows_Net50 (AzureCloud):
7979
Pool: "azsdk-pool-mms-win-2019-general"
8080
OSVmImage: "MMS2019"
81-
TestTargetFramework: net5.0
81+
TestTargetFramework: net6.0
8282
SubscriptionConfiguration: $(sub-config-azure-cloud-test-resources)
8383
ArmTemplateParameters: $(azureCloudArmParameters)
8484
Location: "westus"

0 commit comments

Comments
 (0)