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.

Intermittent Paket.Restore.props error in 5.181.1 - Index was outside the bounds of the array

See original GitHub issue

Description

After upgrading Paket to 5.181.1 from 5.173.1 I get an intermittent build error in Paket.Restore.props.

Repro steps

  1. Run .paket\paket.exe restore
  2. Run dotnet.exe restore MyProject.csproj --no-dependencies

Expected behavior

Packages are restored

Actual behavior

 Checking Paket version (version 5.181.1 requested)...
  Paket.exe 5.181.1 is up to date.
  Paket version 5.181.1
  The last restore is still up to date. Nothing left to do.
  Performance:
   - Runtime: 104 milliseconds
C:\path\to\project\.paket\Paket.Restore.targets(147,5): error MSB4184: The expression ""System.String[]".GetValue(5)" cannot be evaluated. Index was outside the bounds of the array. 

Known workarounds

Delete all un-source-controlled files and rebuild.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:20 (18 by maintainers)

github_iconTop GitHub Comments

1reaction
forkicommented, Nov 7, 2018

That is actually a good point. I fucked up here. Let me try to fix it myself.

Am Mi., 7. Nov. 2018, 08:11 hat Yaakov notifications@github.com geschrieben:

Possibly, but at the same time, I’ve never seen a similar tool that requires major intervention on a minor version upgrade. It should be able to either deal with it, or self-heal.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/fsprojects/Paket/issues/3404#issuecomment-436526395, or mute the thread https://github.com/notifications/unsubscribe-auth/AADgNBuKOyLebmToiFFZfUzy5SnQ_YYUks5usoe4gaJpZM4YBMwo .

1reaction
yaakov-hcommented, Oct 30, 2018

It seems to be reliably trigger-able by a dirty workspace.

In my case, Project\obj\Project.csproj.netstandard2.0.paket.resolved, Project\obj\Project.csproj.net46.paket.resolved and similar are CSV files with only 5 columns, not 6.

e.g.

Newtonsoft.Json,11.0.2,Transitive,Main,false
Microsoft.AspNet.WebApi.Client,5.2.6,Direct,Main,false

I assume that either:

  • Paket did not know to invalidate this and recompute this intermediary file, or
  • Paket does know to invalidate and recompute, but does that at some point after the MSBuild parsing runs and crashes.
Read more comments on GitHub >

github_iconTop Results From Across the Web

"Index was outside the bounds of the array" error while ...
I have a simple .NET Web application that works fine when I run it on my local machine. However, when I try to...
Read more >
Index was outside the bounds of the array.
When I run this project on unity it keeps doing this error: IndexOutOfRangeException: Index was outside the bounds of the array.
Read more >
Index was outside the bounds of the array.
I try to open Assembly then it show that error "// Assembly Exam#
Read more >
Paket and the .NET SDK / .NET Core CLI tools (dotnet CLI ...
For example, if you open a Paket-enabled solution in Visual Studio 2017 then Visual Studio's background build will restore Paket dependencies automatically.
Read more >
Error "Index was outside the bounds of the array" when ...
When importing a return package in SDL Trados Studio the following error message displays: Index was outside the bounds of the array.
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