Merge pull request #5966 from ramarag/displayerror

display exception as error
This commit is contained in:
Eric Erhardt 2017-03-08 18:07:33 -06:00 committed by GitHub
commit 5a5dfecad7

View file

@ -73,16 +73,16 @@ namespace Microsoft.DotNet.Tools.Cache
if (!projectArguments.HasValue())
{
throw new InvalidOperationException(LocalizableStrings.SpecifyEntries);
throw new InvalidOperationException(LocalizableStrings.SpecifyEntries).DisplayAsError();
}
msbuildArgs.Add("/t:ComposeCache");
msbuildArgs.Add(projectArguments.Values[0]);
var _additionalProjectsargs = projectArguments.Values.Skip(1);
var additionalProjectsargs = projectArguments.Values.Skip(1);
if (_additionalProjectsargs.Count() > 0)
if (additionalProjectsargs.Count() > 0)
{
msbuildArgs.Add($"/p:AdditionalProjects={string.Join("%3B", _additionalProjectsargs)}");
msbuildArgs.Add($"/p:AdditionalProjects={string.Join("%3B", additionalProjectsargs)}");
}
if (!string.IsNullOrEmpty(frameworkOption.Value()))