dotnet / project-system-tools

Tools for working with the C#/VB/F# project system.
MIT License
270 stars 42 forks source link

Error during publish #467

Closed drewnoakes closed 1 year ago

drewnoakes commented 1 year ago

Reported by a user via a review on the VS Marketplace.

fails to log an IDE Publish

Microsoft.Build.Exceptions.InternalLoggerException: The build stopped unexpectedly because of an unexpected logger failure. ---> System.InvalidOperationException: Operation is not valid due to the current state of the object.
   at Microsoft.VisualStudio.ProjectSystem.Tools.BuildLogging.Model.BackEnd.Build.Finish(Boolean succeeded, DateTime time)
   at Microsoft.Build.Utilities.MuxLogger.SubmissionRecord.RaiseProjectFinishedEvent(Object sender, ProjectFinishedEventArgs buildEvent)
   at Microsoft.Build.Framework.ProjectFinishedEventHandler.Invoke(Object sender, ProjectFinishedEventArgs e)
   at Microsoft.Build.BackEnd.Logging.EventSourceSink.RaiseProjectFinishedEvent(Object sender, ProjectFinishedEventArgs buildEvent)
   --- End of inner exception stack trace ---
   at Microsoft.Build.Exceptions.InternalLoggerException.Throw(Exception innerException, BuildEventArgs e, String messageResourceName, Boolean initializationException, String[] messageArgs)
   at Microsoft.Build.BackEnd.Logging.EventSourceSink.RaiseProjectFinishedEvent(Object sender, ProjectFinishedEventArgs buildEvent)
   at Microsoft.Build.BackEnd.Logging.LoggingService.RouteBuildEvent(KeyValuePair`2 nodeEvent)
   at Microsoft.Build.BackEnd.Logging.LoggingService.RouteBuildEvent(Object loggingEvent)
   at Microsoft.Build.BackEnd.Logging.LoggingService.LoggingEventProcessor(Object loggingEvent)
drewnoakes commented 1 year ago

Unfortunately I'm not able to reproduce this. If someone can repro this, please include more information than the above stack trace.

drewnoakes commented 1 year ago

I've changed the code to simply return in this case rather than throw and fail the build.