From 19ed5a558b14d7b542498b9541dd572cd18d10f2 Mon Sep 17 00:00:00 2001 From: Piotr Puszkiewicz Date: Tue, 24 Jan 2017 21:59:18 -0800 Subject: [PATCH 1/9] WiP --- build_projects/dotnet-cli-build/DotNetTool.cs | 5 ++ .../EnvironmentVariableFilter.cs | 54 +++++++++++++++++++ 2 files changed, 59 insertions(+) create mode 100644 build_projects/dotnet-cli-build/EnvironmentVariableFilter.cs diff --git a/build_projects/dotnet-cli-build/DotNetTool.cs b/build_projects/dotnet-cli-build/DotNetTool.cs index d074856b0..58f813cab 100644 --- a/build_projects/dotnet-cli-build/DotNetTool.cs +++ b/build_projects/dotnet-cli-build/DotNetTool.cs @@ -1,5 +1,6 @@ // Copyright (c) .NET Foundation and contributors. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. +using System.Linq; using Microsoft.Build.Framework; using Microsoft.Build.Utilities; @@ -12,6 +13,10 @@ namespace Microsoft.DotNet.Cli.Build { public DotNetTool() { + EnvironmentVariables = new EnvironmentFilter() + .GetEnvironmentVariableNamesToRemove() + .Select(e => $"{e}=") + .ToArray(); } protected abstract string Command { get; } diff --git a/build_projects/dotnet-cli-build/EnvironmentVariableFilter.cs b/build_projects/dotnet-cli-build/EnvironmentVariableFilter.cs new file mode 100644 index 000000000..54f5272f7 --- /dev/null +++ b/build_projects/dotnet-cli-build/EnvironmentVariableFilter.cs @@ -0,0 +1,54 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Microsoft.DotNet.Cli.Build +{ + public class EnvironmentFilter + { + private const string _MSBuildEnvironmentVariablePrefix = "MSBuild"; + private const string _DotNetEnvironmentVariablePrefix = "DOTNET"; + private const string _NugetEnvironmentVariablePrefix = "NUGET"; + + private IEnumerable _prefixesOfEnvironmentVariablesToRemove = new string [] + { + _MSBuildEnvironmentVariablePrefix, + _DotNetEnvironmentVariablePrefix, + _NugetEnvironmentVariablePrefix + }; + + private IEnumerable _environmentVariablesToRemove = new string [] + { + "CscToolExe" + }; + + private IEnumerable _environmentVariablesToKeep = new string [] + { + "DOTNET_CLI_TELEMETRY_SESSIONID" + }; + + public IEnumerable GetEnvironmentVariableNamesToRemove() + { + var allEnvironmentVariableNames = (IEnumerable)Environment + .GetEnvironmentVariables() + .Keys + .Cast(); + + var environmentVariablesToRemoveByPrefix = allEnvironmentVariableNames + .Where(e => _prefixesOfEnvironmentVariablesToRemove.Any(p => e.StartsWith(p))); + + var environmentVariablesToRemoveByName = allEnvironmentVariableNames + .Where(e => _environmentVariablesToRemove.Contains(e)); + + var environmentVariablesToRemove = environmentVariablesToRemoveByName + .Concat(environmentVariablesToRemoveByPrefix) + .Distinct() + .Except(_environmentVariablesToKeep); + + return environmentVariablesToRemoveByName; + } + } +} From c25abfb7c7fb559ddeeaeff633ad6942abd1db8e Mon Sep 17 00:00:00 2001 From: Piotr Puszkiewicz Date: Wed, 25 Jan 2017 10:34:50 -0800 Subject: [PATCH 2/9] WiP --- build/Microsoft.DotNet.Cli.tasks | 1 + .../InvokeWithStage0.proj | 11 +++++++ .../InvokeWithStage2.proj | 25 ++++++++++++++++ .../dotnet-cli-build/DotNetMSBuild.cs | 30 +++++++++++++++++++ build_projects/dotnet-cli-build/DotNetTool.cs | 11 +++++++ 5 files changed, 78 insertions(+) create mode 100644 build_projects/Microsoft.DotNet.Cli.Build.SelfTest/InvokeWithStage0.proj create mode 100644 build_projects/Microsoft.DotNet.Cli.Build.SelfTest/InvokeWithStage2.proj create mode 100644 build_projects/dotnet-cli-build/DotNetMSBuild.cs diff --git a/build/Microsoft.DotNet.Cli.tasks b/build/Microsoft.DotNet.Cli.tasks index 49553a226..89c188c72 100644 --- a/build/Microsoft.DotNet.Cli.tasks +++ b/build/Microsoft.DotNet.Cli.tasks @@ -9,6 +9,7 @@ + diff --git a/build_projects/Microsoft.DotNet.Cli.Build.SelfTest/InvokeWithStage0.proj b/build_projects/Microsoft.DotNet.Cli.Build.SelfTest/InvokeWithStage0.proj new file mode 100644 index 000000000..3437872d9 --- /dev/null +++ b/build_projects/Microsoft.DotNet.Cli.Build.SelfTest/InvokeWithStage0.proj @@ -0,0 +1,11 @@ + + + + + + + + + + \ No newline at end of file diff --git a/build_projects/Microsoft.DotNet.Cli.Build.SelfTest/InvokeWithStage2.proj b/build_projects/Microsoft.DotNet.Cli.Build.SelfTest/InvokeWithStage2.proj new file mode 100644 index 000000000..c27f097ea --- /dev/null +++ b/build_projects/Microsoft.DotNet.Cli.Build.SelfTest/InvokeWithStage2.proj @@ -0,0 +1,25 @@ + + + + false + true + false + true + false + true + + + + + + + + + + + + \ No newline at end of file diff --git a/build_projects/dotnet-cli-build/DotNetMSBuild.cs b/build_projects/dotnet-cli-build/DotNetMSBuild.cs new file mode 100644 index 000000000..c5531b802 --- /dev/null +++ b/build_projects/dotnet-cli-build/DotNetMSBuild.cs @@ -0,0 +1,30 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +namespace Microsoft.DotNet.Cli.Build +{ + public class DotNetMSBuild : DotNetTool + { + protected override string Command + { + get { return "msbuild"; } + } + + protected override string Args + { + get { return $"{GetArguments()}"; } + } + + public string Arguments { get; set; } + + private string GetArguments() + { + if (!string.IsNullOrEmpty(Arguments)) + { + return $"{Arguments}"; + } + + return null; + } + } +} diff --git a/build_projects/dotnet-cli-build/DotNetTool.cs b/build_projects/dotnet-cli-build/DotNetTool.cs index 58f813cab..7a12d0355 100644 --- a/build_projects/dotnet-cli-build/DotNetTool.cs +++ b/build_projects/dotnet-cli-build/DotNetTool.cs @@ -1,5 +1,6 @@ // Copyright (c) .NET Foundation and contributors. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. +using System; using System.Linq; using Microsoft.Build.Framework; @@ -13,10 +14,20 @@ namespace Microsoft.DotNet.Cli.Build { public DotNetTool() { +Log.LogMessage(MessageImportance.High, "STARTING "); EnvironmentVariables = new EnvironmentFilter() .GetEnvironmentVariableNamesToRemove() .Select(e => $"{e}=") .ToArray(); + +Log.LogMessage(MessageImportance.High, "OVERRIDING "); + + foreach (var ev in EnvironmentVariables) + { + Log.LogMessage(MessageImportance.High, $"{ev}"); + } + + throw new Exception($"{EnvironmentVariables.Count()}"); } protected abstract string Command { get; } From 94e74d846a7e30772957b43dbab9091ebe6a8da0 Mon Sep 17 00:00:00 2001 From: Piotr Puszkiewicz Date: Wed, 25 Jan 2017 17:14:07 -0800 Subject: [PATCH 3/9] WiP --- build_projects/dotnet-cli-build/DotNetTool.cs | 45 ++++++++++++++----- .../EnvironmentVariableFilter.cs | 25 ++++++++++- 2 files changed, 56 insertions(+), 14 deletions(-) diff --git a/build_projects/dotnet-cli-build/DotNetTool.cs b/build_projects/dotnet-cli-build/DotNetTool.cs index 7a12d0355..d433c526a 100644 --- a/build_projects/dotnet-cli-build/DotNetTool.cs +++ b/build_projects/dotnet-cli-build/DotNetTool.cs @@ -1,6 +1,7 @@ // Copyright (c) .NET Foundation and contributors. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; +using System.Collections.Generic; using System.Linq; using Microsoft.Build.Framework; @@ -14,26 +15,38 @@ namespace Microsoft.DotNet.Cli.Build { public DotNetTool() { -Log.LogMessage(MessageImportance.High, "STARTING "); - EnvironmentVariables = new EnvironmentFilter() - .GetEnvironmentVariableNamesToRemove() - .Select(e => $"{e}=") - .ToArray(); - -Log.LogMessage(MessageImportance.High, "OVERRIDING "); + // var ev2r = new EnvironmentFilter() + // .GetEnvironmentVariableNamesToRemove(); - foreach (var ev in EnvironmentVariables) - { - Log.LogMessage(MessageImportance.High, $"{ev}"); - } + // foreach (var ev in ev2r) + // { + // Console.WriteLine($"EV {ev}"); + // } - throw new Exception($"{EnvironmentVariables.Count()}"); + // EnvironmentVariables = ev2r + // .Select(e => $"{e}=") + // .ToArray(); + + // foreach (var ev in EnvironmentVariables) + // { + // Console.WriteLine($"EV {ev}"); + // } } protected abstract string Command { get; } protected abstract string Args { get; } + protected override Dictionary EnvironmentOverride + { + get + { + return new EnvironmentFilter() + .GetEnvironmentVariableNamesToRemove() + .ToDictionary(e => e, e => (string)null); + } + } + public string WorkingDirectory { get; set; } protected override string ToolName @@ -63,6 +76,14 @@ Log.LogMessage(MessageImportance.High, "OVERRIDING "); protected override string GetWorkingDirectory() { + +Log.LogMessage(MessageImportance.High, "OVERRIDING "); + + foreach (var ev in EnvironmentVariables) + { + Log.LogMessage(MessageImportance.High, $"{ev}"); + } + return WorkingDirectory ?? base.GetWorkingDirectory(); } diff --git a/build_projects/dotnet-cli-build/EnvironmentVariableFilter.cs b/build_projects/dotnet-cli-build/EnvironmentVariableFilter.cs index 54f5272f7..183ad58d6 100644 --- a/build_projects/dotnet-cli-build/EnvironmentVariableFilter.cs +++ b/build_projects/dotnet-cli-build/EnvironmentVariableFilter.cs @@ -27,7 +27,8 @@ namespace Microsoft.DotNet.Cli.Build private IEnumerable _environmentVariablesToKeep = new string [] { - "DOTNET_CLI_TELEMETRY_SESSIONID" + "DOTNET_CLI_TELEMETRY_SESSIONID", + "NUGET_PACKAGES" }; public IEnumerable GetEnvironmentVariableNamesToRemove() @@ -36,19 +37,39 @@ namespace Microsoft.DotNet.Cli.Build .GetEnvironmentVariables() .Keys .Cast(); + + foreach (var envVar in allEnvironmentVariableNames) + { + Console.WriteLine($"ev: {envVar}"); + } var environmentVariablesToRemoveByPrefix = allEnvironmentVariableNames .Where(e => _prefixesOfEnvironmentVariablesToRemove.Any(p => e.StartsWith(p))); + foreach (var envVar in environmentVariablesToRemoveByPrefix) + { + Console.WriteLine($"evp: {envVar}"); + } + var environmentVariablesToRemoveByName = allEnvironmentVariableNames .Where(e => _environmentVariablesToRemove.Contains(e)); + foreach (var envVar in environmentVariablesToRemoveByName) + { + Console.WriteLine($"evn: {envVar}"); + } + var environmentVariablesToRemove = environmentVariablesToRemoveByName .Concat(environmentVariablesToRemoveByPrefix) .Distinct() .Except(_environmentVariablesToKeep); + + foreach (var envVar in environmentVariablesToRemove) + { + Console.WriteLine($"evr: {envVar}"); + } - return environmentVariablesToRemoveByName; + return environmentVariablesToRemove; } } } From a473c2bad74c4beeeb0042fb196bc8321e6c1b08 Mon Sep 17 00:00:00 2001 From: PiotrP Date: Wed, 25 Jan 2017 18:23:42 -0800 Subject: [PATCH 4/9] WiP --- .../InvokeWithStage0.proj | 2 +- build_projects/dotnet-cli-build/DotNetTool.cs | 35 +++++-------------- .../EnvironmentVariableFilter.cs | 23 ++---------- 3 files changed, 12 insertions(+), 48 deletions(-) diff --git a/build_projects/Microsoft.DotNet.Cli.Build.SelfTest/InvokeWithStage0.proj b/build_projects/Microsoft.DotNet.Cli.Build.SelfTest/InvokeWithStage0.proj index 3437872d9..71dc8d373 100644 --- a/build_projects/Microsoft.DotNet.Cli.Build.SelfTest/InvokeWithStage0.proj +++ b/build_projects/Microsoft.DotNet.Cli.Build.SelfTest/InvokeWithStage0.proj @@ -4,7 +4,7 @@ - diff --git a/build_projects/dotnet-cli-build/DotNetTool.cs b/build_projects/dotnet-cli-build/DotNetTool.cs index d433c526a..478c1139e 100644 --- a/build_projects/dotnet-cli-build/DotNetTool.cs +++ b/build_projects/dotnet-cli-build/DotNetTool.cs @@ -15,22 +15,6 @@ namespace Microsoft.DotNet.Cli.Build { public DotNetTool() { - // var ev2r = new EnvironmentFilter() - // .GetEnvironmentVariableNamesToRemove(); - - // foreach (var ev in ev2r) - // { - // Console.WriteLine($"EV {ev}"); - // } - - // EnvironmentVariables = ev2r - // .Select(e => $"{e}=") - // .ToArray(); - - // foreach (var ev in EnvironmentVariables) - // { - // Console.WriteLine($"EV {ev}"); - // } } protected abstract string Command { get; } @@ -41,8 +25,15 @@ namespace Microsoft.DotNet.Cli.Build { get { - return new EnvironmentFilter() - .GetEnvironmentVariableNamesToRemove() + var ev2r = new EnvironmentFilter() + .GetEnvironmentVariableNamesToRemove(); + + foreach (var ev in ev2r) + { + Console.WriteLine($"EV {ev}"); + } + + return ev2r .ToDictionary(e => e, e => (string)null); } } @@ -76,14 +67,6 @@ namespace Microsoft.DotNet.Cli.Build protected override string GetWorkingDirectory() { - -Log.LogMessage(MessageImportance.High, "OVERRIDING "); - - foreach (var ev in EnvironmentVariables) - { - Log.LogMessage(MessageImportance.High, $"{ev}"); - } - return WorkingDirectory ?? base.GetWorkingDirectory(); } diff --git a/build_projects/dotnet-cli-build/EnvironmentVariableFilter.cs b/build_projects/dotnet-cli-build/EnvironmentVariableFilter.cs index 183ad58d6..87a965b22 100644 --- a/build_projects/dotnet-cli-build/EnvironmentVariableFilter.cs +++ b/build_projects/dotnet-cli-build/EnvironmentVariableFilter.cs @@ -28,6 +28,7 @@ namespace Microsoft.DotNet.Cli.Build private IEnumerable _environmentVariablesToKeep = new string [] { "DOTNET_CLI_TELEMETRY_SESSIONID", + "DOTNET_SKIP_FIRST_TIME_EXPERIENCE", "NUGET_PACKAGES" }; @@ -37,38 +38,18 @@ namespace Microsoft.DotNet.Cli.Build .GetEnvironmentVariables() .Keys .Cast(); - - foreach (var envVar in allEnvironmentVariableNames) - { - Console.WriteLine($"ev: {envVar}"); - } var environmentVariablesToRemoveByPrefix = allEnvironmentVariableNames .Where(e => _prefixesOfEnvironmentVariablesToRemove.Any(p => e.StartsWith(p))); - - foreach (var envVar in environmentVariablesToRemoveByPrefix) - { - Console.WriteLine($"evp: {envVar}"); - } - + var environmentVariablesToRemoveByName = allEnvironmentVariableNames .Where(e => _environmentVariablesToRemove.Contains(e)); - foreach (var envVar in environmentVariablesToRemoveByName) - { - Console.WriteLine($"evn: {envVar}"); - } - var environmentVariablesToRemove = environmentVariablesToRemoveByName .Concat(environmentVariablesToRemoveByPrefix) .Distinct() .Except(_environmentVariablesToKeep); - foreach (var envVar in environmentVariablesToRemove) - { - Console.WriteLine($"evr: {envVar}"); - } - return environmentVariablesToRemove; } } From d70aeb950bfb1c71544c57180fa7e2556d119af2 Mon Sep 17 00:00:00 2001 From: Piotr Puszkiewicz Date: Fri, 27 Jan 2017 00:32:13 -0800 Subject: [PATCH 5/9] Success! --- build_projects/dotnet-cli-build/DotNetTool.cs | 26 ++++++++++--------- 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/build_projects/dotnet-cli-build/DotNetTool.cs b/build_projects/dotnet-cli-build/DotNetTool.cs index 478c1139e..f14bc9b15 100644 --- a/build_projects/dotnet-cli-build/DotNetTool.cs +++ b/build_projects/dotnet-cli-build/DotNetTool.cs @@ -2,6 +2,7 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; using System.Collections.Generic; +using System.Diagnostics; using System.Linq; using Microsoft.Build.Framework; @@ -21,21 +22,22 @@ namespace Microsoft.DotNet.Cli.Build protected abstract string Args { get; } - protected override Dictionary EnvironmentOverride + protected override ProcessStartInfo GetProcessStartInfo( + string pathToTool, + string commandLineCommands, + string responseFileSwitch) { - get + var psi = base.GetProcessStartInfo( + pathToTool, + commandLineCommands, + responseFileSwitch); + + foreach (var environmentVariableName in new EnvironmentFilter().GetEnvironmentVariableNamesToRemove()) { - var ev2r = new EnvironmentFilter() - .GetEnvironmentVariableNamesToRemove(); - - foreach (var ev in ev2r) - { - Console.WriteLine($"EV {ev}"); - } - - return ev2r - .ToDictionary(e => e, e => (string)null); + psi.Environment.Remove(environmentVariableName); } + + return psi; } public string WorkingDirectory { get; set; } From c4e928a18ddd6d719229404aac7c05dbf239d339 Mon Sep 17 00:00:00 2001 From: Piotr Puszkiewicz Date: Fri, 27 Jan 2017 00:45:59 -0800 Subject: [PATCH 6/9] Cleanup --- build/Microsoft.DotNet.Cli.Test.targets | 8 +++++++- .../InvokeWithStage0.proj | 6 ++---- build_projects/dotnet-cli-build/DotNetTool.cs | 3 --- run-build.ps1 | 4 ++-- run-build.sh | 4 ++-- 5 files changed, 13 insertions(+), 12 deletions(-) diff --git a/build/Microsoft.DotNet.Cli.Test.targets b/build/Microsoft.DotNet.Cli.Test.targets index d7d4c28bd..bfe39ba14 100644 --- a/build/Microsoft.DotNet.Cli.Test.targets +++ b/build/Microsoft.DotNet.Cli.Test.targets @@ -11,7 +11,8 @@ + DependsOnTargets="EnsureStageSeparation; + BuildTests;"> : @@ -101,4 +102,9 @@ MsbuildArgs="%(TestPackageProject.MsbuildArgs) /p:SdkNuGetVersion=$(SdkNugetVersion)" /> + + + + diff --git a/build_projects/Microsoft.DotNet.Cli.Build.SelfTest/InvokeWithStage0.proj b/build_projects/Microsoft.DotNet.Cli.Build.SelfTest/InvokeWithStage0.proj index 71dc8d373..4175b21fc 100644 --- a/build_projects/Microsoft.DotNet.Cli.Build.SelfTest/InvokeWithStage0.proj +++ b/build_projects/Microsoft.DotNet.Cli.Build.SelfTest/InvokeWithStage0.proj @@ -3,9 +3,7 @@ - - - + \ No newline at end of file diff --git a/build_projects/dotnet-cli-build/DotNetTool.cs b/build_projects/dotnet-cli-build/DotNetTool.cs index f14bc9b15..cc3d1cd83 100644 --- a/build_projects/dotnet-cli-build/DotNetTool.cs +++ b/build_projects/dotnet-cli-build/DotNetTool.cs @@ -1,9 +1,6 @@ // Copyright (c) .NET Foundation and contributors. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. -using System; -using System.Collections.Generic; using System.Diagnostics; -using System.Linq; using Microsoft.Build.Framework; using Microsoft.Build.Utilities; diff --git a/run-build.ps1 b/run-build.ps1 index 3e16346ce..f70516668 100644 --- a/run-build.ps1 +++ b/run-build.ps1 @@ -103,8 +103,8 @@ if ($LastExitCode -ne 0) # install the post-PJnistic stage0 $dotnetInstallPath = Join-Path $toolsLocalPath "dotnet-install.ps1" -Write-Host "$dotnetInstallPath -Version ""1.0.0-preview5-004422"" -InstallDir $env:DOTNET_INSTALL_DIR -Architecture ""$Architecture""" -Invoke-Expression "$dotnetInstallPath -Version ""1.0.0-preview5-004422"" -InstallDir $env:DOTNET_INSTALL_DIR -Architecture ""$Architecture""" +Write-Host "$dotnetInstallPath -InstallDir $env:DOTNET_INSTALL_DIR -Architecture ""$Architecture""" +Invoke-Expression "$dotnetInstallPath -InstallDir $env:DOTNET_INSTALL_DIR -Architecture ""$Architecture""" if ($LastExitCode -ne 0) { Write-Output "The .NET CLI installation failed with exit code $LastExitCode" diff --git a/run-build.sh b/run-build.sh index 399099364..8ca76a05b 100755 --- a/run-build.sh +++ b/run-build.sh @@ -163,8 +163,8 @@ if [ $? != 0 ]; then fi # now execute the script -echo "installing CLI: $dotnetInstallPath --version \"1.0.0-preview5-004422\" --install-dir $DOTNET_INSTALL_DIR --architecture \"$ARCHITECTURE\"" -$dotnetInstallPath --version "1.0.0-preview5-004422" --install-dir $DOTNET_INSTALL_DIR --architecture "$ARCHITECTURE" +echo "installing CLI: $dotnetInstallPath --install-dir $DOTNET_INSTALL_DIR --architecture \"$ARCHITECTURE\"" +$dotnetInstallPath --install-dir $DOTNET_INSTALL_DIR --architecture "$ARCHITECTURE" if [ $? != 0 ]; then echo "run-build: Error: Boot-strapping post-PJ stage0 with exit code $?." >&2 exit $? From 401a2dd2ce59e6b6924b50fe08594cbb0bc8b770 Mon Sep 17 00:00:00 2001 From: Piotr Puszkiewicz Date: Fri, 27 Jan 2017 00:56:51 -0800 Subject: [PATCH 7/9] pr feedback --- build/Microsoft.DotNet.Cli.Test.targets | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build/Microsoft.DotNet.Cli.Test.targets b/build/Microsoft.DotNet.Cli.Test.targets index bfe39ba14..5de38045d 100644 --- a/build/Microsoft.DotNet.Cli.Test.targets +++ b/build/Microsoft.DotNet.Cli.Test.targets @@ -104,7 +104,7 @@ - + From 0ab87924b2a99791f8331747c723873845de6037 Mon Sep 17 00:00:00 2001 From: Piotr Puszkiewicz Date: Fri, 27 Jan 2017 01:18:50 -0800 Subject: [PATCH 8/9] Add DOTNET_RUNTIME_ID to kept environment variables --- build_projects/dotnet-cli-build/EnvironmentVariableFilter.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/build_projects/dotnet-cli-build/EnvironmentVariableFilter.cs b/build_projects/dotnet-cli-build/EnvironmentVariableFilter.cs index 87a965b22..d5a7a5acf 100644 --- a/build_projects/dotnet-cli-build/EnvironmentVariableFilter.cs +++ b/build_projects/dotnet-cli-build/EnvironmentVariableFilter.cs @@ -28,6 +28,7 @@ namespace Microsoft.DotNet.Cli.Build private IEnumerable _environmentVariablesToKeep = new string [] { "DOTNET_CLI_TELEMETRY_SESSIONID", + "DOTNET_RUNTIME_ID", "DOTNET_SKIP_FIRST_TIME_EXPERIENCE", "NUGET_PACKAGES" }; From bbac129c0406ce138280b27a80c2cfdb4e8679f8 Mon Sep 17 00:00:00 2001 From: Piotr Puszkiewicz Date: Fri, 27 Jan 2017 01:45:31 -0800 Subject: [PATCH 9/9] Account for Windows slashes --- .../InvokeWithStage2.proj | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/build_projects/Microsoft.DotNet.Cli.Build.SelfTest/InvokeWithStage2.proj b/build_projects/Microsoft.DotNet.Cli.Build.SelfTest/InvokeWithStage2.proj index c27f097ea..1493128e7 100644 --- a/build_projects/Microsoft.DotNet.Cli.Build.SelfTest/InvokeWithStage2.proj +++ b/build_projects/Microsoft.DotNet.Cli.Build.SelfTest/InvokeWithStage2.proj @@ -1,12 +1,16 @@ - + + + $([System.IO.Path]::GetDirectoryName($(ToolPath)/)) + + false - true + true false - true + true false - true + true @@ -14,12 +18,12 @@ Text="ToolPath not set" /> + Text="MSBuildExtensionsPath '$(MSBuildExtensionsPath)' not in ToolPath '$(NormalizedToolPath)'" /> + Text="CscToolExe '$(CscToolExe)' not in ToolPath '$(NormalizedToolPath)'" /> + Text="MSBuildSDKsPath '$(MSBuildSDKsPath)' not in ToolPath '$(NormalizedToolPath)'" /> \ No newline at end of file