Display the proper message log level when parsing project files

This commit is contained in:
Jérôme Laban 2018-11-11 21:42:04 -05:00
Родитель f68b2865d3
Коммит 148194ee6a
2 изменённых файлов: 26 добавлений и 5 удалений

Просмотреть файл

@ -258,7 +258,19 @@ namespace Uno.SourceGeneration.Host
ws.LoadMetadataForReferencedProjects = true;
ws.WorkspaceFailed +=
(s, e) => this.Log().Error(e.Diagnostic.ToString());
(s, e) =>
{
switch (e.Diagnostic.Kind)
{
case WorkspaceDiagnosticKind.Warning:
this.Log().Warn(e.Diagnostic.Message);
break;
case WorkspaceDiagnosticKind.Failure:
this.Log().Error(e.Diagnostic.Message);
break;
}
};
var project = await ws.OpenProjectAsync(_environment.ProjectFile);

Просмотреть файл

@ -173,8 +173,12 @@ namespace Uno.SourceGeneratorTasks
{
var hostBinPath = Path.Combine(hostPath, "Uno.SourceGeneration.Host.dll");
string arguments = $"\"{hostBinPath}\" \"{responseFile}\" \"{outputFile}\" \"{binlogFile}\"";
var pi = new ProcessStartInfo("dotnet", arguments);
pi.UseShellExecute = false;
var pi = new ProcessStartInfo("dotnet", arguments)
{
UseShellExecute = false,
CreateNoWindow = true,
WindowStyle = ProcessWindowStyle.Hidden,
};
return pi;
}
@ -182,8 +186,13 @@ namespace Uno.SourceGeneratorTasks
{
var hostBinPath = Path.Combine(hostPath, "Uno.SourceGeneration.Host.exe");
string arguments = $"\"{responseFile}\" \"{outputFile}\" \"{binlogFile}\"";
var pi = new ProcessStartInfo(hostBinPath, arguments);
pi.UseShellExecute = false;
var pi = new ProcessStartInfo(hostBinPath, arguments)
{
UseShellExecute = false,
CreateNoWindow = true,
WindowStyle = ProcessWindowStyle.Hidden,
};
return pi;
}