From 2668a0e8a9458f8fd85b815036e448095bce9a73 Mon Sep 17 00:00:00 2001 From: "N. Taylor Mullen" Date: Thu, 28 Feb 2019 15:01:52 -0800 Subject: [PATCH] Skip first run experience locally and on azure pipelines. - This would cause our functional tests to time out and occasionally crash due to dotnet first run experience sentinels being locked. aspnet/AspNetCore-Internal#1859 --- azure-pipelines.yml | 2 ++ .../IntegrationTests/MSBuildProcessManager.cs | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index aa5187e3e6..54714a300d 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -3,6 +3,8 @@ variables: value: true - name: _TeamName value: AspNetCore +- name: DOTNET_SKIP_FIRST_TIME_EXPERIENCE + value: true resources: containers: diff --git a/src/Razor/test/Microsoft.NET.Sdk.Razor.Test/IntegrationTests/MSBuildProcessManager.cs b/src/Razor/test/Microsoft.NET.Sdk.Razor.Test/IntegrationTests/MSBuildProcessManager.cs index c420b47bb8..0d598ce741 100644 --- a/src/Razor/test/Microsoft.NET.Sdk.Razor.Test/IntegrationTests/MSBuildProcessManager.cs +++ b/src/Razor/test/Microsoft.NET.Sdk.Razor.Test/IntegrationTests/MSBuildProcessManager.cs @@ -41,6 +41,10 @@ namespace Microsoft.AspNetCore.Razor.Design.IntegrationTests { processStartInfo.FileName = DotNetMuxer.MuxerPathOrDefault(); processStartInfo.Arguments = $"msbuild {arguments}"; + + // Suppresses the 'Welcome to .NET Core!' output that times out tests and causes locked file issues. + // When using dotnet we're not guarunteed to run in an environment where the dotnet.exe has had its first run experience already invoked. + processStartInfo.EnvironmentVariables["DOTNET_SKIP_FIRST_TIME_EXPERIENCE"] = "true"; } var processResult = await RunProcessCoreAsync(processStartInfo, timeout);