Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix design-time build name and viewer #402

Merged
merged 1 commit into from
Jun 19, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions src/LogModel/Builder/ModelBuilder.cs
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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