From 7c3f9a3d187a5b908ac74bc24051153052435b3b Mon Sep 17 00:00:00 2001
From: Phil Allen <phillipa@microsoft.com>
Date: Fri, 10 Jan 2025 13:51:13 -0800
Subject: [PATCH] Add service connection for NugetAuthenticate

---
 azure-pipelines/build.yml | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/azure-pipelines/build.yml b/azure-pipelines/build.yml
index 5f684e39..ba84671e 100644
--- a/azure-pipelines/build.yml
+++ b/azure-pipelines/build.yml
@@ -4,6 +4,9 @@ steps:
 
 - task: UseDotNet@2
   displayName: Install .NET Core SDK
+  inputs:
+    packageType: sdk
+    useGlobalJson: true
 
 - ${{ if eq(variables['system.collectionId'], '011b8bdf-6d56-4f87-be0d-0092136884d9') }}:
   - template: /azure-pipelines/azure-pipeline.microbuild.before.yml@self
@@ -13,6 +16,9 @@ steps:
 
 - task: NuGetAuthenticate@1
   displayName: 'Authenticate with NuGet'
+  inputs:
+    ${{ if eq(variables['system.collectionId'], '011b8bdf-6d56-4f87-be0d-0092136884d9') }}:
+      nuGetServiceConnections: azure-public/readonly
 
 - task: PowerShell@2
   displayName: 'dotnet restore'