React to TryGetProject changes
This commit is contained in:
parent
cb426cb325
commit
d22a638e55
|
|
@ -40,10 +40,16 @@ namespace Microsoft.DotNet.Watcher.Core.Internal
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
var errors = new List<DiagnosticMessage>();
|
if (!ProjectReader.TryGetProject(projectFile, out project))
|
||||||
if (!ProjectReader.TryGetProject(projectFile, out project, errors))
|
|
||||||
{
|
{
|
||||||
errorMessage = string.Join(Environment.NewLine, errors.Select(e => e.ToString()));
|
if (project?.Diagnostics != null && project.Diagnostics.Any())
|
||||||
|
{
|
||||||
|
errorMessage = string.Join(Environment.NewLine, project.Diagnostics.Select(e => e.ToString()));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
errorMessage = "Failed to read project.json";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue