Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 4 additions & 9 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -108,7 +107,8 @@ stages:

- job: MacOS
displayName: 'MacOS'
pool: Hosted macOS
pool:
vmImage: 'macOS-latest'
strategy:
matrix:
Debug:
Expand All @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion eng/Versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@
<SystemValueTupleVersion>4.5.0</SystemValueTupleVersion>
<SystemTextJsonVersion>4.7.2</SystemTextJsonVersion>
<!-- libgit2 used for integration tests -->
<LibGit2SharpVersion>0.26.0-preview-0070</LibGit2SharpVersion>
<LibGit2SharpVersion>0.27.0-preview-0119</LibGit2SharpVersion>
</PropertyGroup>
</Project>
18 changes: 16 additions & 2 deletions src/TestUtilities/DotNetSdk/DotNetSdkTestBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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;
}

Expand Down Expand Up @@ -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, "<SourceRoot Include=\"(.*)\" */>",
match => (i++ == 0) ? $"<SourceRoot Include=\"{NuGetPackageFolders}\" />" : "");
File.WriteAllText(generatedPropsFilePath, content, Encoding.UTF8);
}
}
}