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

Unable to view binlog - VS Win 16.10 (MSBuild 16.10) #390

Closed
mrward opened this issue May 26, 2021 · 2 comments
Closed

Unable to view binlog - VS Win 16.10 (MSBuild 16.10) #390

mrward opened this issue May 26, 2021 · 2 comments
Assignees

Comments

@mrward
Copy link

mrward commented May 26, 2021

Creating a classic .NET console project (or a .NET Core console project) and it is not possible to view the binlog - errors are reported:

image

Version installed: 1.0.1.2010501

I suspect this may be due to binlog file changes made in MSBuild 16.10 since I am using the project system tools code in VS Mac and that works OK for MSBuild 16.9 binlogs but not for MSBuild 16.10 binlogs (and has the same error output).

However the errors seem similar to this other issue - #388

@KirillOsenkov KirillOsenkov self-assigned this May 26, 2021
@mrward
Copy link
Author

mrward commented May 26, 2021

Removing the evaluationId check seems to fix the problem for me on VS Mac.

diff --git a/src/LogModel/Builder/ModelBuilder.cs b/src/LogModel/Builder/ModelBuilder.cs
index 58175e5..d90a84a 100644
--- a/src/LogModel/Builder/ModelBuilder.cs
+++ b/src/LogModel/Builder/ModelBuilder.cs
@@ -231,8 +231,7 @@ namespace Microsoft.VisualStudio.ProjectSystem.LogModel.Builder
         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);
             }

Which seems to be the same problem as in #388 looking at the diagnosis section.

mrward added a commit to mrward/project-system-tools that referenced this issue May 27, 2021
args.BuildEventContext.EvaluationId is not set to -1
args.BuildEventContext.ProjectContextId is not set to
InvalidProjectContextId

Fixes dotnet#390
@drewnoakes
Copy link
Member

Fixed in #402. Thanks for your work identifying the issue @mrward!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants