Skip to content

Commit

Permalink
remove unused env var
Browse files Browse the repository at this point in the history
* DOTNET_SKIP_FIRST_TIME_EXPERIENCE
  • Loading branch information
bruno-garcia committed Sep 12, 2021
1 parent 07c7a4d commit 27b6661
Show file tree
Hide file tree
Showing 7 changed files with 0 additions and 17 deletions.
4 changes: 0 additions & 4 deletions eng/common/tools.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -157,9 +157,6 @@ function InitializeDotNetCli([bool]$install, [bool]$createSdkLocationFile) {
# Don't resolve runtime, shared framework, or SDK from other locations to ensure build determinism
$env:DOTNET_MULTILEVEL_LOOKUP=0

# Disable first run since we do not need all ASP.NET packages restored.
$env:DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1

# Disable telemetry on CI.
if ($ci) {
$env:DOTNET_CLI_TELEMETRY_OPTOUT=1
Expand Down Expand Up @@ -231,7 +228,6 @@ function InitializeDotNetCli([bool]$install, [bool]$createSdkLocationFile) {
Write-PipelinePrependPath -Path $dotnetRoot

Write-PipelineSetVariable -Name 'DOTNET_MULTILEVEL_LOOKUP' -Value '0'
Write-PipelineSetVariable -Name 'DOTNET_SKIP_FIRST_TIME_EXPERIENCE' -Value '1'

return $global:_DotNetInstallDir = $dotnetRoot
}
Expand Down
4 changes: 0 additions & 4 deletions eng/common/tools.sh
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,6 @@ function InitializeDotNetCli {
# Don't resolve runtime, shared framework, or SDK from other locations to ensure build determinism
export DOTNET_MULTILEVEL_LOOKUP=0

# Disable first run since we want to control all package sources
export DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1

# Disable telemetry on CI
if [[ $ci == true ]]; then
export DOTNET_CLI_TELEMETRY_OPTOUT=1
Expand Down Expand Up @@ -165,7 +162,6 @@ function InitializeDotNetCli {
Write-PipelinePrependPath -path "$dotnet_root"

Write-PipelineSetVariable -name "DOTNET_MULTILEVEL_LOOKUP" -value "0"
Write-PipelineSetVariable -name "DOTNET_SKIP_FIRST_TIME_EXPERIENCE" -value "1"

# return value
_InitializeDotNetCli="$dotnet_root"
Expand Down
1 change: 0 additions & 1 deletion eng/restore-toolset.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ function CreateBuildEnvScript()
$scriptContents = @"
@echo off
title SDK Build ($RepoRoot)
set DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1
set DOTNET_MULTILEVEL_LOOKUP=0
set DOTNET_ROOT=$env:DOTNET_INSTALL_DIR
Expand Down
1 change: 0 additions & 1 deletion eng/restore-toolset.sh
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ function CreateBuildEnvScript {
scriptPath="$artifacts_dir/sdk-build-env.sh"
scriptContents="
#!/bin/bash
export DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1
export DOTNET_MULTILEVEL_LOOKUP=0
export DOTNET_ROOT=$DOTNET_INSTALL_DIR
Expand Down
2 changes: 0 additions & 2 deletions src/Tests/Microsoft.NET.TestFramework/TestContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,6 @@ public void AddTestEnvironmentVariables(SdkCommandSpec command)
// Set NUGET_PACKAGES environment variable to match value from build.ps1
command.Environment["NUGET_PACKAGES"] = NuGetCachePath;

command.Environment["DOTNET_SKIP_FIRST_TIME_EXPERIENCE"] = "1";

command.Environment["GenerateResourceMSBuildArchitecture"] = "CurrentArchitecture";
command.Environment["GenerateResourceMSBuildRuntime"] = "CurrentRuntime";

Expand Down
1 change: 0 additions & 1 deletion src/Tests/dotnet-watch.Tests/Utilities/AwaitableProcess.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ public void Start()
var processStartInfo = _spec.GetProcessStartInfo();
processStartInfo.RedirectStandardOutput = true;
processStartInfo.RedirectStandardError = true;
processStartInfo.Environment["DOTNET_SKIP_FIRST_TIME_EXPERIENCE"] = "true";

_process = new Process
{
Expand Down
4 changes: 0 additions & 4 deletions src/WebSdk/Publish/Tasks/Tasks/GenerateEFSQLScripts.cs
Original file line number Diff line number Diff line change
Expand Up @@ -76,13 +76,10 @@ private void InitializeProperties()
private int _processExitCode;
private StringBuilder _standardOut = new StringBuilder();
private StringBuilder _standardError = new StringBuilder();
private const string SkipFirstTimeEnvironmentVariable = "DOTNET_SKIP_FIRST_TIME_EXPERIENCE";
private const string AspNetCoreEnvironment = "ASPNETCORE_ENVIRONMENT";
private bool GenerateSQLScript(string sqlFileFullPath, string dbContextName, bool isLoggingEnabled = true)
{
string previousSkipValue = Environment.GetEnvironmentVariable(SkipFirstTimeEnvironmentVariable);
string previousAspNetCoreEnvironment = Environment.GetEnvironmentVariable(AspNetCoreEnvironment);
Environment.SetEnvironmentVariable(SkipFirstTimeEnvironmentVariable, "true");
Environment.SetEnvironmentVariable(AspNetCoreEnvironment, "Development");
ProcessStartInfo psi = new ProcessStartInfo("dotnet", $@"ef migrations script --no-build --idempotent --configuration {Configuration} --output ""{sqlFileFullPath}"" --context {dbContextName} {EFMigrationsAdditionalArgs}")
{
Expand Down Expand Up @@ -128,7 +125,6 @@ private bool GenerateSQLScript(string sqlFileFullPath, string dbContextName, boo
isProcessExited = proc.WaitForExit(300000);
}

Environment.SetEnvironmentVariable(SkipFirstTimeEnvironmentVariable, previousSkipValue);
Environment.SetEnvironmentVariable(AspNetCoreEnvironment, previousAspNetCoreEnvironment);
if (!isProcessExited || _processExitCode != 0)
{
Expand Down

0 comments on commit 27b6661

Please sign in to comment.