diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 98844bf59..28e1a77d3 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -49,8 +49,7 @@ stages: - job: Windows pool: ${{ if or(eq(variables['System.TeamProject'], 'public'), in(variables['Build.Reason'], 'PullRequest')) }}: - name: NetCore1ESPool-Public - demands: ImageOverride -equals Build.Windows.10.Amd64.VS2017.Open + vmImage: 'windows-latest' ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: name: NetCore1ESPool-Internal demands: ImageOverride -equals Build.Windows.10.Amd64.VS2017 @@ -108,7 +107,8 @@ stages: - job: MacOS displayName: 'MacOS' - pool: Hosted macOS + pool: + vmImage: 'macOS-latest' strategy: matrix: Debug: @@ -128,12 +128,7 @@ stages: - job: Linux displayName: 'Linux' pool: - ${{ if or(eq(variables['System.TeamProject'], 'public'), in(variables['Build.Reason'], 'PullRequest')) }}: - name: NetCore1ESPool-Public - demands: ImageOverride -equals Build.Ubuntu.1604.Amd64.Open - ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: - name: NetCore1ESPool-Internal - demands: ImageOverride -equals Build.Ubuntu.1604.Amd64 + vmImage: 'ubuntu-latest' strategy: matrix: Debug: diff --git a/eng/Versions.props b/eng/Versions.props index 717449612..46b8d64d4 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -19,6 +19,6 @@ 4.5.0 4.7.2 - 0.26.0-preview-0070 + 0.27.0-preview-0119 diff --git a/src/TestUtilities/DotNetSdk/DotNetSdkTestBase.cs b/src/TestUtilities/DotNetSdk/DotNetSdkTestBase.cs index 8608bf802..4fcb8fa27 100644 --- a/src/TestUtilities/DotNetSdk/DotNetSdkTestBase.cs +++ b/src/TestUtilities/DotNetSdk/DotNetSdkTestBase.cs @@ -7,6 +7,7 @@ using System.IO; using System.Linq; using System.Reflection; +using System.Text; using System.Text.RegularExpressions; using NuGet.Versioning; using Xunit; @@ -191,7 +192,7 @@ public DotNetSdkTestBase(params string[] packages) { "MSBuildSDKsPath", sdksDir }, { "DOTNET_MSBUILD_SDK_RESOLVER_SDKS_DIR", sdksDir }, { "NUGET_PACKAGES", NuGetCacheDir.Path }, - { "NuGetPackageFolders", NuGetPackageFolders } + { "NuGetPackageFolders", NuGetPackageFolders }, }; ProjectDir = RootDir.CreateDirectory(ProjectName); @@ -241,9 +242,12 @@ protected void VerifyValues( Assert.True(restoreResult.ExitCode == 0, $"Failed with exit code {restoreResult.ExitCode}: {restoreResult.Output}"); Assert.True(File.Exists(Path.Combine(ProjectObjDir.Path, "project.assets.json"))); - Assert.True(File.Exists(Path.Combine(ProjectObjDir.Path, ProjectFileName + ".nuget.g.props"))); + var generatedPropsFilePath = Path.Combine(ProjectObjDir.Path, ProjectFileName + ".nuget.g.props"); + Assert.True(File.Exists(generatedPropsFilePath)); Assert.True(File.Exists(Path.Combine(ProjectObjDir.Path, ProjectFileName + ".nuget.g.targets"))); + FixupGeneratedPropsFilePath(generatedPropsFilePath); + _projectRestored = true; } @@ -301,5 +305,15 @@ static bool diagnosticsEqual(string expected, string actual) } } } + + // Workaround for https://github.com/NuGet/Home/issues/11455 + private void FixupGeneratedPropsFilePath(string generatedPropsFilePath) + { + var content = File.ReadAllText(generatedPropsFilePath, Encoding.UTF8); + int i = 0; + content = Regex.Replace(content, "", + match => (i++ == 0) ? $"" : ""); + File.WriteAllText(generatedPropsFilePath, content, Encoding.UTF8); + } } }