diff --git a/.config/dotnet-tools.json b/.config/dotnet-tools.json index 83fc41ce19..e383e75d13 100644 --- a/.config/dotnet-tools.json +++ b/.config/dotnet-tools.json @@ -3,7 +3,7 @@ "isRoot": true, "tools": { "nuke.globaltool": { - "version": "8.1.4", + "version": "9.0.1", "commands": [ "nuke" ] diff --git a/build/Build.Steps.Windows.cs b/build/Build.Steps.Windows.cs index 27dda070a3..e30832be7b 100644 --- a/build/Build.Steps.Windows.cs +++ b/build/Build.Steps.Windows.cs @@ -291,7 +291,7 @@ private void RunNetFxGacOperation(string operation) DotNetRun(s => s .SetProjectFile(installTool) .SetConfiguration(BuildConfiguration) - .SetApplicationArguments($"{operation} {netFxAssembliesFolder}")); + .SetApplicationArguments(operation, netFxAssembliesFolder)); static bool IsWindowsAdministrator() { diff --git a/build/Build.Steps.cs b/build/Build.Steps.cs index e891b882b1..ff4a92ef87 100644 --- a/build/Build.Steps.cs +++ b/build/Build.Steps.cs @@ -79,7 +79,7 @@ DotNetRestoreSettings Restore(DotNetRestoreSettings s) => .SetVerbosity(DotNetVerbosity.normal) .SetProperty("configuration", BuildConfiguration.ToString()) .SetPlatform(Platform) - .When(!string.IsNullOrEmpty(NuGetPackagesDirectory), o => o.SetPackageDirectory(NuGetPackagesDirectory)); + .When(_ => !string.IsNullOrEmpty(NuGetPackagesDirectory), o => o.SetPackageDirectory(NuGetPackagesDirectory)); if (LibraryVersion.TryGetVersions(project.Name, Platform, out var libraryVersions)) { @@ -162,7 +162,7 @@ DotNetRestoreSettings Restore(DotNetRestoreSettings s) => .SetNoRestore(true) // project w/ packages.config can't do the restore via dotnet CLI .SetPlatform(Platform) .SetConfiguration(BuildConfiguration) - .When(TestTargetFramework != TargetFramework.NOT_SPECIFIED, + .When(_ => TestTargetFramework != TargetFramework.NOT_SPECIFIED, x => x.SetFramework(TestTargetFramework))); continue; @@ -192,7 +192,7 @@ DotNetBuildSettings BuildTestApplication(DotNetBuildSettings x) => .SetConfiguration(BuildConfiguration) .SetPlatform(Platform) .SetNoRestore(NoRestore) - .When(TestTargetFramework != TargetFramework.NOT_SPECIFIED, + .When(_ =>TestTargetFramework != TargetFramework.NOT_SPECIFIED, s => s.SetFramework(actualTestTfm)); if (LibraryVersion.Versions.TryGetValue(app.Name, out var libraryVersions)) @@ -221,7 +221,7 @@ DotNetBuildSettings BuildTestApplication(DotNetBuildSettings x) => .SetProjectFile(project) .SetConfiguration(BuildConfiguration) .SetNoRestore(NoRestore) - .When(TestTargetFramework != TargetFramework.NOT_SPECIFIED, + .When(_ => TestTargetFramework != TargetFramework.NOT_SPECIFIED, s => s.SetFramework(TestTargetFramework))); } }); @@ -365,7 +365,7 @@ void RemoveFilesInNetFolderAvailableInAdditionalStore() DotNetRun(s => s .SetProjectFile(verifier) - .SetApplicationArguments($"--verify {RootDirectory}")); + .SetApplicationArguments("--verify", RootDirectory)); }); Target GenerateLibraryVersionFiles => _ => _ @@ -455,7 +455,7 @@ void RemoveFilesInNetFolderAvailableInAdditionalStore() .SetProjectFile(Solution.GetProjectByName(Projects.Mocks.AutoInstrumentationMock)) .SetConfiguration(BuildConfiguration) .SetNoRestore(NoRestore) - .When(TestTargetFramework != TargetFramework.NOT_SPECIFIED, + .When(_ => TestTargetFramework != TargetFramework.NOT_SPECIFIED, s => s.SetFramework(TestTargetFramework)) ); }); @@ -502,7 +502,7 @@ void RemoveFilesInNetFolderAvailableInAdditionalStore() .SetNoRestore(NoRestore) .SetProcessEnvironmentVariable("OTEL_DOTNET_AUTO_LOG_DIRECTORY", ProfilerTestLogs) .EnableNoBuild() - .When(TestTargetFramework != TargetFramework.NOT_SPECIFIED, + .When(_ => TestTargetFramework != TargetFramework.NOT_SPECIFIED, x => x.SetFramework(TestTargetFramework)) .CombineWith(unitTestProjects, (s, project) => s .EnableTrxLogOutput(GetResultsDirectory(project)) @@ -531,7 +531,7 @@ void RemoveFilesInNetFolderAvailableInAdditionalStore() .EnableTrxLogOutput(GetResultsDirectory(project)) .SetTargetPath(project) .SetRestore(!NoRestore) - .When(TestTargetFramework != TargetFramework.NOT_SPECIFIED, + .When(_ => TestTargetFramework != TargetFramework.NOT_SPECIFIED, s => s.SetProperty("TargetFramework", TestTargetFramework.ToString())) .RunTests() ); @@ -713,7 +713,7 @@ private void RunBootstrappingTests() .EnableTrxLogOutput(GetResultsDirectory(project)) .SetProjectFile(project) .SetFilter(AndFilter(TestNameFilter(), testName)) - .When(TestTargetFramework != TargetFramework.NOT_SPECIFIED, s => s.SetFramework(TestTargetFramework)) + .When(_ => TestTargetFramework != TargetFramework.NOT_SPECIFIED, s => s.SetFramework(TestTargetFramework)) .SetProcessEnvironmentVariable("OTEL_DOTNET_AUTO_LOG_DIRECTORY", ProfilerTestLogs) .SetProcessEnvironmentVariable("BOOSTRAPPING_TESTS", "true")); } @@ -734,7 +734,7 @@ private void RestoreLegacyNuGetPackagesConfig(IEnumerable legacyRestore .SetTargetPath(project) .SetSolutionDirectory(Solution.Directory) .SetVerbosity(NuGetVerbosity.Normal) - .When(!string.IsNullOrEmpty(NuGetPackagesDirectory), o => + .When(_ => !string.IsNullOrEmpty(NuGetPackagesDirectory), o => o.SetPackagesDirectory(NuGetPackagesDirectory))); } } diff --git a/build/Directory.Packages.props b/build/Directory.Packages.props index 7557b84b29..092733c4f7 100644 --- a/build/Directory.Packages.props +++ b/build/Directory.Packages.props @@ -3,8 +3,7 @@ - + - diff --git a/build/_build.csproj b/build/_build.csproj index 164391e725..4556dd88d8 100644 --- a/build/_build.csproj +++ b/build/_build.csproj @@ -16,7 +16,6 @@ -