From b149b23afb451fcbd336a24cbca33090404da237 Mon Sep 17 00:00:00 2001 From: Saurabh Gautam Date: Thu, 24 Oct 2024 15:36:34 +0100 Subject: [PATCH 1/4] Use nuget config --- build/template-restore-build-MSIdentityWeb.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/build/template-restore-build-MSIdentityWeb.yaml b/build/template-restore-build-MSIdentityWeb.yaml index d4bfd7814..0e18d7e58 100644 --- a/build/template-restore-build-MSIdentityWeb.yaml +++ b/build/template-restore-build-MSIdentityWeb.yaml @@ -52,6 +52,8 @@ steps: nugetConfigPath: NuGet.config projects: '$(IdWebSourceDir)tests\DevApps\daemon-app\Daemon-app\Daemon-app.csproj' arguments: '-f net7.0' + feedsToUse: 'config' + nugetConfigPath: NuGet.config - task: ms.vss-governance-buildtask.governance-build-task-component-detection.ComponentGovernanceComponentDetection@0 displayName: 'Component Detection' From 276b86ea7503f9d203e749cf458ec24132c1b84e Mon Sep 17 00:00:00 2001 From: Saurabh Gautam Date: Thu, 24 Oct 2024 15:49:56 +0100 Subject: [PATCH 2/4] Use feed while building --- build/template-restore-build-MSIdentityWeb.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build/template-restore-build-MSIdentityWeb.yaml b/build/template-restore-build-MSIdentityWeb.yaml index 0e18d7e58..56cb11dbd 100644 --- a/build/template-restore-build-MSIdentityWeb.yaml +++ b/build/template-restore-build-MSIdentityWeb.yaml @@ -25,6 +25,8 @@ steps: inputs: command: 'custom' custom: 'build' + feedsToUse: 'config' + nugetConfigPath: NuGet.config projects: '$(IdWebSourceDir)Microsoft.Identity.Web.sln' arguments: '-p:configuration=${{ parameters.BuildConfiguration }} -p:RunCodeAnalysis=true -p:MicrosoftIdentityWebVersion=${{ parameters.MicrosoftIdentityWebVersion }} -p:SourceLinkCreate=true' @@ -52,8 +54,6 @@ steps: nugetConfigPath: NuGet.config projects: '$(IdWebSourceDir)tests\DevApps\daemon-app\Daemon-app\Daemon-app.csproj' arguments: '-f net7.0' - feedsToUse: 'config' - nugetConfigPath: NuGet.config - task: ms.vss-governance-buildtask.governance-build-task-component-detection.ComponentGovernanceComponentDetection@0 displayName: 'Component Detection' From 9bb7b4d03318748f88a1d7fd8777c053c1a5ac10 Mon Sep 17 00:00:00 2001 From: Saurabh Gautam Date: Fri, 25 Oct 2024 12:52:54 +0100 Subject: [PATCH 3/4] Use nuget config --- NuGet.Config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NuGet.Config b/NuGet.Config index 7604d0051..98f152bd9 100644 --- a/NuGet.Config +++ b/NuGet.Config @@ -2,6 +2,6 @@ - + From 8fcafb8534b4588fda3ba9e21dbf9a52d811db06 Mon Sep 17 00:00:00 2001 From: Saurabh Gautam Date: Fri, 25 Oct 2024 15:44:02 +0100 Subject: [PATCH 4/4] push location --- NuGet.Config | 2 +- build/template-restore-build-MSIdentityWeb.yaml | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/NuGet.Config b/NuGet.Config index 98f152bd9..7604d0051 100644 --- a/NuGet.Config +++ b/NuGet.Config @@ -2,6 +2,6 @@ - + diff --git a/build/template-restore-build-MSIdentityWeb.yaml b/build/template-restore-build-MSIdentityWeb.yaml index 56cb11dbd..f4472b422 100644 --- a/build/template-restore-build-MSIdentityWeb.yaml +++ b/build/template-restore-build-MSIdentityWeb.yaml @@ -12,12 +12,14 @@ steps: displayName: 'Install wasm-tools' - powershell: | + Push-Location $(IdWebSourceDir) $nugetSourceIsExternal = (dotnet nuget list source --format Short).Contains("https://api.nuget.org/v3/index.json") if ($nugetSourceIsExternal) { dotnet nuget remove source NuGet dotnet nuget add source https://identitydivision.pkgs.visualstudio.com/_packaging/IDDP/nuget/v3/index.json -n IDDP dotnet nuget list source } + Pop-Location displayName: 'Remove external "NuGet" Source and add "IDDP artifacts" as a NuGet Source, if needed.' - task: DotNetCoreCLI@2