Right-clicking in the Project window provides the ability to “Open” always. Clicking the “Open” context-menu button, while no asset is selected, displays an ArgumentOutOfRangeException.
ArgumentOutOfRangeException: startIndex cannot be larger than length of string.```
Video
[spoiler]
https://www.youtube.com/watch?v=gnR-ekTo1LU
[/spoiler]
**Reproduce**
- Open attached project or create a new one
- Right-click in the Project window while no asset is selected
- Choose "Open" from the context-menu
**Actual**
Unity outputs an ArgumentOutOfRangeException exception.
**Expected**
The "Open" button should be disabled if there is no selection.
Had the same error and this worked:
Exit the unity, delete all auto-generated csproj and sln files from the root folder of the game, open the project again and generate them thru Preferences->External Tools->Regenerate project files.