dotnet-installer/build_projects/shared-build-targets-utils/Utils/EnvVars.cs
Eric Erhardt a7becbe6d8 Fix passing /p:DISABLE_CROSSGEN on cli.
When passing a property using the commandline, it is not flown through to "dotnet publish" calls.  So instead of using "dotnet publish", just use the MSBuild task to invoke the Publish target on the reidst project.  This way properties flow correctly.

I also did a little cleaning of unused build logic.
2017-04-04 17:50:28 -05:00

21 lines
639 B
C#

// 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;
namespace Microsoft.DotNet.Cli.Build
{
public class EnvVars
{
public static string EnsureVariable(string variableName)
{
string value = Environment.GetEnvironmentVariable(variableName);
if (string.IsNullOrEmpty(value))
{
throw new BuildFailureException($"'{variableName}' environment variable was not found.");
}
return value;
}
}
}