diff --git a/.vsts-dotnet-ci.yml b/.vsts-dotnet-ci.yml index 60a757b7803..d143b8b6b19 100644 --- a/.vsts-dotnet-ci.yml +++ b/.vsts-dotnet-ci.yml @@ -3,6 +3,16 @@ trigger: - exp/* - vs* +variables: +- ${{ if eq(variables['System.TeamProject'], 'DevDiv') }}: + - group: AzureDevOps-Artifact-Feeds-Pats +- name: cfsNugetWarnLevel + value: warn +- name: nugetMultiFeedWarnLevel + value: none +- name: NugetSecurityAnalysisWarningLevel + value: none + jobs: - job: CheckVersionBumpOnReleaseBranches displayName: "Check Version Bump On Release Branches" @@ -65,6 +75,14 @@ jobs: pool: vmImage: 'windows-2022' steps: + - ${{ if eq(variables['System.TeamProject'], 'DevDiv') }}: + - task: PowerShell@2 + displayName: Setup Private Feeds Credentials + inputs: + filePath: $(Build.SourcesDirectory)/eng/common/SetupNugetSources.ps1 + arguments: -ConfigFile $(Build.SourcesDirectory)/NuGet.config -Password $Env:Token + env: + Token: $(dn-bot-dnceng-artifact-feeds-rw) - task: BatchScript@1 displayName: cibuild_bootstrapped_msbuild.cmd inputs: @@ -136,6 +154,14 @@ jobs: pool: vmImage: 'windows-2022' steps: + - ${{ if eq(variables['System.TeamProject'], 'DevDiv') }}: + - task: PowerShell@2 + displayName: Setup Private Feeds Credentials + inputs: + filePath: $(Build.SourcesDirectory)/eng/common/SetupNugetSources.ps1 + arguments: -ConfigFile $(Build.SourcesDirectory)/NuGet.config -Password $Env:Token + env: + Token: $(dn-bot-dnceng-artifact-feeds-rw) - task: BatchScript@1 displayName: cibuild_bootstrapped_msbuild.cmd inputs: @@ -191,6 +217,14 @@ jobs: name: VSEngSS-MicroBuild2022-1ES demands: agent.os -equals Windows_NT steps: + - ${{ if eq(variables['System.TeamProject'], 'DevDiv') }}: + - task: PowerShell@2 + displayName: Setup Private Feeds Credentials + inputs: + filePath: $(Build.SourcesDirectory)/eng/common/SetupNugetSources.ps1 + arguments: -ConfigFile $(Build.SourcesDirectory)/NuGet.config -Password $Env:Token + env: + Token: $(dn-bot-dnceng-artifact-feeds-rw) - task: BatchScript@1 displayName: cibuild.cmd inputs: @@ -265,6 +299,14 @@ jobs: pool: vmImage: 'ubuntu-latest' steps: + - ${{ if eq(variables['System.TeamProject'], 'DevDiv') }}: + - task: Bash@3 + displayName: Setup Private Feeds Credentials + inputs: + filePath: $(Build.SourcesDirectory)/eng/common/SetupNugetSources.sh + arguments: $(Build.SourcesDirectory)/NuGet.config $Token + env: + Token: $(dn-bot-dnceng-artifact-feeds-rw) - bash: . 'eng/cibuild_bootstrapped_msbuild.sh' --onlyDocChanged $(onlyDocChanged) displayName: CI Build - task: PublishTestResults@2 @@ -322,6 +364,14 @@ jobs: pool: vmImage: 'macOS-latest' steps: + - ${{ if eq(variables['System.TeamProject'], 'DevDiv') }}: + - task: Bash@3 + displayName: Setup Private Feeds Credentials + inputs: + filePath: $(Build.SourcesDirectory)/eng/common/SetupNugetSources.sh + arguments: $(Build.SourcesDirectory)/NuGet.config $Token + env: + Token: $(dn-bot-dnceng-artifact-feeds-rw) - bash: . 'eng/cibuild_bootstrapped_msbuild.sh' --onlyDocChanged $(onlyDocChanged) displayName: CI Build - task: PublishTestResults@2 diff --git a/.vsts-dotnet.yml b/.vsts-dotnet.yml index bf994785873..47280eea93c 100644 --- a/.vsts-dotnet.yml +++ b/.vsts-dotnet.yml @@ -37,6 +37,13 @@ variables: value: true # Enable loc for vs17.14 - name: Codeql.Enabled value: true + - group: AzureDevOps-Artifact-Feeds-Pats + - name: cfsNugetWarnLevel + value: warn + - name: nugetMultiFeedWarnLevel + value: none + - name: NugetSecurityAnalysisWarningLevel + value: none resources: repositories: @@ -120,6 +127,14 @@ extends: - task: NuGetToolInstaller@1 displayName: 'Install NuGet.exe' + - task: PowerShell@2 + displayName: Setup Private Feeds Credentials + inputs: + filePath: $(Build.SourcesDirectory)/eng/common/SetupNugetSources.ps1 + arguments: -ConfigFile $(Build.SourcesDirectory)/NuGet.config -Password $Env:Token + env: + Token: $(dn-bot-dnceng-artifact-feeds-rw) + - task: NuGetCommand@2 displayName: Restore internal tools inputs: diff --git a/eng/build.ps1 b/eng/build.ps1 index eaf7cc577d8..d71fa299fd8 100644 --- a/eng/build.ps1 +++ b/eng/build.ps1 @@ -150,7 +150,7 @@ function Set-OptProfVariables() { function Check-EditedFiles() { # Log VSTS errors for changed lines - git --no-pager diff HEAD --unified=0 --no-color --exit-code | ForEach-Object { "##vso[task.logissue type=error] $_" } + git --no-pager diff HEAD --unified=0 --no-color --exit-code -- src/ | ForEach-Object { "##vso[task.logissue type=error] $_" } if ($LASTEXITCODE -ne 0) { throw "##vso[task.logissue type=error] After building, there are changed files. Please build locally and include these changes in your pull request." } diff --git a/src/Shared/FrameworkLocationHelper.cs b/src/Shared/FrameworkLocationHelper.cs index b0b620ad68a..2bc28819c6e 100644 --- a/src/Shared/FrameworkLocationHelper.cs +++ b/src/Shared/FrameworkLocationHelper.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. using System; @@ -1390,6 +1390,7 @@ public virtual string GetPathToDotNetFramework(DotNetFrameworkArchitecture archi // Assume if either MSBuild.exe or Microsoft.Build.dll are shipped, there is a valid install. // Note: net481 did not ship an ARM64 MSBuild.exe, so checking its dll's is the fallback for a valid install. // Context: https://github.com/dotnet/msbuild/pull/7689 + // Rollback see https://developercommunity.visualstudio.com/t/Unable-to-locate-MSBuild-path-with-Lates/10824132 if (this._hasMsBuild && generatedPathToDotNetFramework != null && (!File.Exists(Path.Combine(generatedPathToDotNetFramework, NativeMethodsShared.IsWindows ? "MSBuild.exe" : "mcs.exe")) && diff --git a/src/Utilities/ToolLocationHelper.cs b/src/Utilities/ToolLocationHelper.cs index 0d45b676cd8..3f13658e0dd 100644 --- a/src/Utilities/ToolLocationHelper.cs +++ b/src/Utilities/ToolLocationHelper.cs @@ -3584,6 +3584,7 @@ public static string GetPathToBuildToolsFile(string fileName, string toolsVersio { toolPath = Path.Combine(toolPath, fileName); + // Rollback see https://developercommunity.visualstudio.com/t/Unable-to-locate-MSBuild-path-with-Lates/10824132 if (!File.Exists(toolPath)) { toolPath = null;