From e63e00ad04168378d216828d447cc4d72094462a Mon Sep 17 00:00:00 2001 From: Mike Harder Date: Wed, 22 Aug 2018 18:15:37 -0700 Subject: [PATCH] Add "/warnaserror" to restore and build - Default templates should have no restore or build warnings --- AspNetCoreSdkTests/Util/DotNetUtil.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/AspNetCoreSdkTests/Util/DotNetUtil.cs b/AspNetCoreSdkTests/Util/DotNetUtil.cs index 182a2d9698..31a0223f11 100644 --- a/AspNetCoreSdkTests/Util/DotNetUtil.cs +++ b/AspNetCoreSdkTests/Util/DotNetUtil.cs @@ -96,7 +96,7 @@ namespace AspNetCoreSdkTests.Util public static string Restore(string workingDirectory, NuGetPackageSource packageSource, RuntimeIdentifier runtimeIdentifier) { - return RunDotNet($"restore --no-cache {packageSource.SourceArgument} {runtimeIdentifier.RuntimeArgument}", + return RunDotNet($"restore /warnaserror --no-cache {packageSource.SourceArgument} {runtimeIdentifier.RuntimeArgument}", workingDirectory, GetEnvironment(packageSource)); } @@ -108,7 +108,7 @@ namespace AspNetCoreSdkTests.Util var restoreArgument = restoreRequired ? $"--no-cache {packageSource.SourceArgument}" : "--no-restore"; - return RunDotNet($"build {restoreArgument} {runtimeIdentifier.RuntimeArgument}", workingDirectory, GetEnvironment(packageSource)); + return RunDotNet($"build /warnaserror {restoreArgument} {runtimeIdentifier.RuntimeArgument}", workingDirectory, GetEnvironment(packageSource)); } public static (Process Process, ConcurrentStringBuilder OutputBuilder, ConcurrentStringBuilder ErrorBuilder) Run(