ArgumentOutOfRangeException during Preprocess on project
See original GitHub issueVersion used: 2.0.109
Analyzing a build on a very simple netcoreapp3.0 console app project, can provide more details or a reproducer repo if needed. I right-clicked a “Project” element, clicked “Preprocess” and got the below error:
Unexpected exception. Sorry about that.
Please Ctrl+C to copy this text and file an issue at https://github.com/KirillOsenkov/MSBuildStructuredLog/issues/new
System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
at System.ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument argument, ExceptionResource resource)
at System.SZArrayHelper.get_Item[T](Int32 index)
at StructuredLogViewer.PreprocessedFileManager.CorrectForMultilineImportElement(SourceText text, Int32 lineNumber)
at StructuredLogViewer.PreprocessedFileManager.GetPreprocessedText(String sourceFilePath)
at StructuredLogViewer.PreprocessedFileManager.GetPreprocessedText(String sourceFilePath)
at StructuredLogViewer.PreprocessedFileManager.ShowPreprocessed(String sourceFilePath)
at StructuredLogViewer.Controls.BuildControl.<.ctor>b__34_13(Object s, RoutedEventArgs a)
at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
at System.Windows.Controls.MenuItem.InvokeClickAfterRender(Object arg)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
Issue Analytics
- State:
- Created 4 years ago
- Comments:9 (5 by maintainers)
Top Results From Across the Web
CA2208: Instantiate argument exceptions correctly
When a method has a parameter, and it throws an exception type that is, ... ArgumentOutOfRangeException(string paramName, string message) ...
Read more >ArgumentOutOfRangeException Class (System)
An ArgumentOutOfRangeException exception is thrown when a method is invoked and at least one of the arguments passed to the method is not...
Read more >YOLOv3 shows ArgumentOutOfRangeException #4578
Hello I'm working on the latest version of Visual Studio 2019 on Windows 10. I have tried to work on object detection using...
Read more >C# Exception Guide: ArgumentOutOfRangeException
The ArgumentOutOfRangeException exception is thrown when the argument passed to a method is not null and contains a value that is not within ......
Read more >A few hundred "Error Loading Action: Init." warnings while ...
Hi, I tried to build my project for the first time in a while, and it seems to have ... ArgumentOutOfRangeException: Index was...
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
Filed https://github.com/microsoft/msbuild/issues/4714
This is all fixed now.