question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ArgumentOutOfRangeException during Preprocess on project

See original GitHub issue

Version 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:closed
  • Created 4 years ago
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
nguerreracommented, Sep 11, 2019
0reactions
KirillOsenkovcommented, Nov 15, 2019

This is all fixed now.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found