Display the proper message log level when parsing project files
This commit is contained in:
Родитель
f68b2865d3
Коммит
148194ee6a
|
@ -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;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче