Skip to content

Commit c476cc3

Browse files
authored
[ci] Update to use VS2022 build agents (#914)
Now that VS2019 doesn't ***officially*** support .NET 6, we are getting lots of warnings trying to build out `net6.0` assemblies on VS2019 build agents: Warning NETSDK1182: Targeting .NET 6.0 in Visual Studio 2019 is not supported. Warning CS8032: An instance of analyzer System.Text.Json.SourceGeneration.JsonSourceGenerator cannot be created from C:\hostedtoolcache\windows\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.0\analyzers\dotnet\cs\System.Text.Json.SourceGeneration.dll : Could not load file or assembly 'Microsoft.CodeAnalysis, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.. [DevOps now offers VS2022 build agents][0] we can switch to in order to build `net6.0` assemblies with no warnings. [0]: https://docs.microsoft.com/en-us/azure/devops/pipelines/agents/hosted
1 parent 087684a commit c476cc3

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

build-tools/automation/azure-pipelines.yaml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,14 @@
33
trigger:
44
- main
55
- d16-*
6+
- d17-*
67

78
pr:
89
branches:
910
include:
1011
- main
1112
- d16-*
13+
- d17-*
1214
paths:
1315
exclude:
1416
- README.md
@@ -21,14 +23,15 @@ variables:
2123
MaxJdkVersion: 8
2224
DotNetCoreVersion: 6.0.x
2325
HostedMacImage: macOS-10.15
24-
HostedWinVS2019: Hosted Windows 2019 with VS2019
26+
HostedWinImage: windows-2022
2527
NetCoreTargetFrameworkPathSuffix: -net6.0
26-
VSInstallRoot: C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise
28+
VSInstallRoot: C:\Program Files\Microsoft Visual Studio\2022\Enterprise
2729

2830
jobs:
2931
- job: windows_build
3032
displayName: Windows - .NET Framework
31-
pool: $(HostedWinVS2019)
33+
pool:
34+
vmImage: $(HostedWinImage)
3235
timeoutInMinutes: 20
3336
workspace:
3437
clean: all
@@ -76,7 +79,8 @@ jobs:
7679

7780
- job: windows_dotnet_build
7881
displayName: Windows - .NET Core
79-
pool: $(HostedWinVS2019)
82+
pool:
83+
vmImage: $(HostedWinImage)
8084
timeoutInMinutes: 20
8185
workspace:
8286
clean: all

0 commit comments

Comments
 (0)