Add "/warnaserror" to restore and build

- Default templates should have no restore or build warnings
This commit is contained in:
Mike Harder 2018-08-22 18:15:37 -07:00
parent ba2eacc3f5
commit e63e00ad04
1 changed files with 2 additions and 2 deletions

View File

@ -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(