diff --git a/src/dotnet-publish-iis/Program.cs b/src/dotnet-publish-iis/Program.cs index 45a599b845..a2fc2622b1 100644 --- a/src/dotnet-publish-iis/Program.cs +++ b/src/dotnet-publish-iis/Program.cs @@ -2,6 +2,7 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; +using Microsoft.DotNet.Cli.Utils; using Microsoft.Extensions.CommandLineUtils; namespace Microsoft.AspNetCore.Tools.PublishIIS @@ -32,7 +33,13 @@ namespace Microsoft.AspNetCore.Tools.PublishIIS return 2; } - return new PublishIISCommand(publishFolder, projectPath.Value, webRootOption.Value()).Run(); + Reporter.Output.WriteLine($"Configuring project published to '{publishFolder}' for use with IIS"); + + var exitCode = new PublishIISCommand(publishFolder, projectPath.Value, webRootOption.Value()).Run(); + + Reporter.Output.WriteLine("Configuring project completed succesfully"); + + return exitCode; }); try @@ -41,11 +48,8 @@ namespace Microsoft.AspNetCore.Tools.PublishIIS } catch (Exception e) { -#if DEBUG - Console.Error.WriteLine(e); -#else - Console.Error.WriteLine(e.Message); -#endif + Reporter.Error.WriteLine(e.Message.Red()); + Reporter.Verbose.WriteLine(e.ToString().Yellow()); } return 1; diff --git a/src/dotnet-publish-iis/project.json b/src/dotnet-publish-iis/project.json index eefde53ba1..f62f1bf0f1 100644 --- a/src/dotnet-publish-iis/project.json +++ b/src/dotnet-publish-iis/project.json @@ -6,15 +6,16 @@ }, "dependencies": { + "Microsoft.NETCore.Platforms": "1.0.0-*", "System.Xml.XDocument": "4.0.11-*", "Microsoft.Extensions.CommandLineUtils": "1.0.0-*", + "Microsoft.DotNet.Cli.Utils": "1.0.0-*", "Microsoft.Extensions.Configuration.Json": "1.0.0-*", "Microsoft.DotNet.ProjectModel": "1.0.0-*" }, "frameworks": { "dnxcore50": { - "Microsoft.NETCore.Platforms": "1.0.0-*" } } }