Error while analyzing build - System.InvalidCastException: Unable to cast object of type 'Microsoft.Build.Logging.StructuredLogger.Folder' to type 'Microsoft.Build.Logging.StructuredLogger.Project'.
See original GitHub issueError while analyzing build. Sorry about that. Please Ctrl+C to copy this text and file an issue on https://github.com/KirillOsenkov/MSBuildStructuredLog/issues/new
System.InvalidCastException: Unable to cast object of type 'Microsoft.Build.Logging.StructuredLogger.Folder' to type 'Microsoft.Build.Logging.StructuredLogger.Project'.
at Microsoft.Build.Logging.StructuredLogger.ImportTreeAnalyzer.AddImport(Message message, String project, String importedProject, Int32 line, Int32 column, Boolean imported, String reason)
at Microsoft.Build.Logging.StructuredLogger.ImportTreeAnalyzer.VisitMessage(Message message, StringCache stringTable)
at Microsoft.Build.Logging.StructuredLogger.TreeNode.VisitAllChildren[T](Action`1 processor, CancellationToken cancellationToken, Boolean takeChildrenSnapshot)
at Microsoft.Build.Logging.StructuredLogger.TreeNode.VisitAllChildren[T](Action`1 processor, CancellationToken cancellationToken, Boolean takeChildrenSnapshot)
at Microsoft.Build.Logging.StructuredLogger.ImportTreeAnalyzer.Analyze(Folder evaluation, StringCache stringTable)
at Microsoft.Build.Logging.StructuredLogger.BuildAnalyzer.ProcessBeforeChildrenVisited(TreeNode node)
at Microsoft.Build.Logging.StructuredLogger.BuildAnalyzer.Visit(TreeNode node)
at Microsoft.Build.Logging.StructuredLogger.BuildAnalyzer.Visit(TreeNode node)
at Microsoft.Build.Logging.StructuredLogger.BuildAnalyzer.Analyze()
at Microsoft.Build.Logging.StructuredLogger.BuildAnalyzer.AnalyzeBuild(Build build)
Issue Analytics
- State:
- Created 5 years ago
- Comments:6 (6 by maintainers)
Top Results From Across the Web
Build project got the error "unable to cast object of type..."
How to fix that problem? According to the error message, it seems the Visual Studio setting of NuGet package managment have been corrupted....
Read more >Exception : Unable to cast object of type 'Microsoft. ...
MSBuildWorkspace: Exception : Unable to cast object of type 'Microsoft.CodeAnalysis.BuildTasks.Csc' to type 'Microsoft.Build.Framework.ITask'. #24691.
Read more >Microsoft.Build.Logging Namespace
A logger that serializes all incoming BuildEventArgs in a compressed binary file (*.binlog). The file can later be played back and piped into...
Read more >System.InvalidCastException: Unable to cast object of type ...
Hi, In my Blazor server application, I am trying to get the records from ... InvalidCastException: Unable to cast object of type 'System....
Read more >MSBUILD : error MSB1025: An internal failure occurred ...
we have restore package task in our pipeline and it is failing intermittently with the outofmemory exception. Please find below logs :
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Thanks to Paulo’s log I have now pushed an even better fix! Found the real problem and solved it. Details here: https://github.com/KirillOsenkov/MSBuildStructuredLog/commit/bd4d73b5116d09fdaf2b90e31a5e08668634281f
YOLO fixes are best fixes