From ce2b7201af43a1eec4534c9e5a904c3460ccdb6d Mon Sep 17 00:00:00 2001 From: Fabio Cavalcante Date: Fri, 31 Jul 2026 09:59:20 -0700 Subject: [PATCH 1/2] Route NuGet restores through CFS Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- .github/workflows/codeQL.yml | 6 ++++-- .gitignore | 1 + NuGet.config | 12 ++++++++++++ azure-pipelines-release.yml | 5 +++++ azure-pipelines.yml | 5 +++++ eng/templates/build.yml | 5 +++++ 6 files changed, 32 insertions(+), 2 deletions(-) create mode 100644 NuGet.config diff --git a/.github/workflows/codeQL.yml b/.github/workflows/codeQL.yml index bf888d3..5a49c66 100644 --- a/.github/workflows/codeQL.yml +++ b/.github/workflows/codeQL.yml @@ -69,10 +69,12 @@ jobs: dotnet-version: '3.1.x' - name: Restore dependencies - run: dotnet restore $solution + shell: pwsh + run: dotnet restore "$env:GITHUB_WORKSPACE\$env:solution" --configfile "$env:GITHUB_WORKSPACE\NuGet.config" - name: Build - run: dotnet build $solution #--configuration $config #--no-restore -p:FileVersionRevision=$GITHUB_RUN_NUMBER -p:ContinuousIntegrationBuild=true + shell: pwsh + run: dotnet build "$env:GITHUB_WORKSPACE\$env:solution" --configuration "$env:config" --no-restore -p:FileVersionRevision="$env:GITHUB_RUN_NUMBER" -p:ContinuousIntegrationBuild=true # Run CodeQL analysis - name: Perform CodeQL Analysis diff --git a/.gitignore b/.gitignore index 01cc9d6..23e6084 100644 --- a/.gitignore +++ b/.gitignore @@ -441,6 +441,7 @@ $RECYCLE.BIN/ # The build keeps auto-generating this file. We do not want this. /.nuget/NuGet.Config NuGet.Config +!/NuGet.config ## Python specifics diff --git a/NuGet.config b/NuGet.config new file mode 100644 index 0000000..93c7dc7 --- /dev/null +++ b/NuGet.config @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/azure-pipelines-release.yml b/azure-pipelines-release.yml index 14b86ea..81bb4d3 100644 --- a/azure-pipelines-release.yml +++ b/azure-pipelines-release.yml @@ -41,10 +41,15 @@ steps: version: '7.0.x' # Start by restoring all the dependencies. +- task: NuGetAuthenticate@1 + displayName: 'Authenticate to CFS' + - task: DotNetCoreCLI@2 displayName: 'Restore nuget dependencies' inputs: command: restore + feedsToUse: config + nugetConfigPath: 'NuGet.config' verbosityRestore: Minimal projects: 'src/dirs.proj' diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 78a7ce1..4e55f26 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -17,8 +17,13 @@ variables: steps: - task: NuGetToolInstaller@1 +- task: NuGetAuthenticate@1 + displayName: 'Authenticate to CFS' + - task: NuGetCommand@2 inputs: + feedsToUse: config + nugetConfigPath: 'NuGet.config' restoreSolution: '$(solution)' - task: UseDotNet@2 diff --git a/eng/templates/build.yml b/eng/templates/build.yml index 708ecef..b642b10 100644 --- a/eng/templates/build.yml +++ b/eng/templates/build.yml @@ -44,10 +44,15 @@ jobs: version: '7.0.x' # Start by restoring all the dependencies. + - task: NuGetAuthenticate@1 + displayName: 'Authenticate to CFS' + - task: DotNetCoreCLI@2 displayName: 'Restore nuget dependencies' inputs: command: restore + feedsToUse: config + nugetConfigPath: 'NuGet.config' verbosityRestore: Minimal projects: 'src/dirs.proj' From cab78d3cc64bcad35e8307d4b2668b550716aa9f Mon Sep 17 00:00:00 2001 From: Fabio Cavalcante Date: Fri, 31 Jul 2026 10:06:28 -0700 Subject: [PATCH 2/2] Install .NET 6 for CodeQL restore Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- .github/workflows/codeQL.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/codeQL.yml b/.github/workflows/codeQL.yml index 5a49c66..9112fb2 100644 --- a/.github/workflows/codeQL.yml +++ b/.github/workflows/codeQL.yml @@ -68,6 +68,11 @@ jobs: with: dotnet-version: '3.1.x' + - name: Set up .NET 6 + uses: actions/setup-dotnet@v3 + with: + dotnet-version: '6.0.x' + - name: Restore dependencies shell: pwsh run: dotnet restore "$env:GITHUB_WORKSPACE\$env:solution" --configfile "$env:GITHUB_WORKSPACE\NuGet.config"