Skip to content

Commit

Permalink
Merge pull request #402 from panopticoncentral/fixes
Browse files Browse the repository at this point in the history
Fix design-time build name and viewer
  • Loading branch information
Paul Vick committed Jun 19, 2021
2 parents a375faf + 22dc4fc commit 4030597
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
9 changes: 4 additions & 5 deletions src/LogModel/Builder/ModelBuilder.cs
Expand Up @@ -231,8 +231,7 @@ private void OnBuildFinished(BuildFinishedEventArgs args)
private static void CheckProjectEventContext(BuildEventArgs args)
{
if (args.BuildEventContext.TargetId != -1 ||
args.BuildEventContext.TaskId != -1 ||
args.BuildEventContext.EvaluationId != -1)
args.BuildEventContext.TaskId != -1)
{
throw new LoggerException(Resources.BadState);
}
Expand All @@ -252,8 +251,7 @@ private void OnProjectStarted(ProjectStartedEventArgs args)
CheckProjectEventContext(args);

if (args.ParentProjectBuildEventContext.TargetId != -1 ||
args.ParentProjectBuildEventContext.TaskId != -1 ||
args.ParentProjectBuildEventContext.EvaluationId != -1)
args.ParentProjectBuildEventContext.TaskId != -1)
{
throw new LoggerException(Resources.BadState);
}
Expand Down Expand Up @@ -771,7 +769,8 @@ private void ProcessMessage(BuildEventArgs args)

if (args.BuildEventContext != null)
{
if (args.BuildEventContext.EvaluationId != BuildEventContext.InvalidEvaluationId)
if (args.BuildEventContext.EvaluationId != BuildEventContext.InvalidEvaluationId &&
args.BuildEventContext.ProjectContextId == BuildEventContext.InvalidProjectContextId)
{
ProcessEvaluationMessage(args);
return;
Expand Down
3 changes: 2 additions & 1 deletion src/ProjectSystemTools/BuildLogging/Model/Backend/Build.cs
Expand Up @@ -20,7 +20,7 @@ namespace Microsoft.VisualStudio.ProjectSystem.Tools.BuildLogging.Model.BackEnd
internal sealed class Build : IDisposable
{
public BuildSummary BuildSummary { get; private set; }
public string ProjectPath { get; }
public string ProjectPath { get; private set; }
public string LogPath { get; private set; }
public int BuildId => BuildSummary.BuildId;
public BuildType BuildType => BuildSummary.BuildType;
Expand All @@ -34,6 +34,7 @@ internal sealed class Build : IDisposable
public Build(string projectPath, IEnumerable<string> dimensions, IEnumerable<string> targets, BuildType buildType, DateTime startTime)
{
int nextId = Interlocked.Increment(ref SharedBuildId);
ProjectPath = projectPath;
BuildSummary = new BuildSummary(nextId, projectPath, dimensions, targets, buildType, startTime);
}

Expand Down

0 comments on commit 4030597

Please sign in to comment.