Skip to content

System.IndexOutOfRangeException: Index was outside the bounds of the array #2674

@wolverine998

Description

@wolverine998

Hello. I'm trying to run the mono version on my phone, using Termux. Dotnet 8.0 installed also. Cannot make it work, I tried the net6.0 version, another error occurs, the MarshalDirectiveException. I wanna write C# code for my company on my device, some minor changes to team code.

mono OmniSharp.exe
{"Event":"log","Body":{"LogLevel":"INFORMATION","Name":"OmniSharp.St.dio.Host","Message":"Starting OmniSharp on Linux 0.0 (Unknown)"},"Seq":1,"Type":"event"}
{"Event":"log","Body":{"LogLevel":"INFORMATION","Name":"OmniSharp.Services.DotNetCliService","Message":"Checking the 'DOTNET_ROOT' environment variable to find a .NET SDK"},"Seq":2,"Type":"event"}
{"Event":"log","Body":{"LogLevel":"INFORMATION","Name":"OmniSharp.Services.DotNetCliService","Message":"DotNetPath set to /data/data/com.termux/files/usr/lib/dotnet/dotnet"},"Seq":3,"Type":"event"}
System.IndexOutOfRangeException: Index was outside the bounds of the array. at OmniSharp.Utilities.PlatformHelper.GetMonoVersion () [0x0002b] in :0 at OmniSharp.MSBuild.Discovery.Providers.MonoInstanceProvider.GetInstances () [0x0009d] in <4af76a30ecc847bf90ccfd5e2f8323eb>:0 at OmniSharp.MSBuild.Discovery.MSBuildLocator.GetInstances () [0x0001b] in <4af76a30ecc847bf90ccfd5e2f8323eb>:0 at OmniSharp.MSBuild.Discovery.Extensions.GetBestInstance (OmniSharp.MSBuild.Discovery.IMSBuildLocator msbuildLocator, System.Version minimumMSBuildVersion, Microsoft.Extensions.Logging.ILogger logger, System.Boolean& invalidVSFound, System.Boolean& vsWithoutSdkResolver) [0x0000b] in <4af76a30ecc847bf90ccfd5e2f8323eb>:0
at OmniSharp.MSBuild.Discovery.Extensions.RegisterDefaultInstance (OmniSharp.MSBuild.Discovery.IMSBuildLocator msbuildLocator, Microsoft.Extensions.Logging.ILogger logger, OmniSharp.Services.DotNetInfo dotNetInfo) [0x0001e] in <4af76a30ecc847bf90ccfd5e2f8323eb>:0
at OmniSharp.CompositionHostBuilder.Build (System.String workingDirectory) [0x000ad] in <4af76a30ecc847bf90ccfd5e2f8323eb>:0
at OmniSharp.Stdio.Host..ctor (System.IO.TextReader input, OmniSharp.Services.ISharedTextWriter writer, OmniSharp.IOmniSharpEnvironment environment, System.IServiceProvider serviceProvider, OmniSharp.CompositionHostBuilder compositionHostBuilder, Microsoft.Extensions.Logging.ILoggerFactory loggerFactory, System.Threading.CancellationTokenSource cancellationTokenSource) [0x00065] in <4d8ba8d016db479195b4fb2b5ff03f71>:0
at OmniSharp.Stdio.Driver.Program+<>c__DisplayClass0_1.

b__1 () [0x0017d] in <29e1c59102d54c138a063037d2e98dd9>:0
at OmniSharp.CommandLineApplication+<>c__DisplayClass12_0.b__0 () [0x0000b] in <4af76a30ecc847bf90ccfd5e2f8323eb>:0
at McMaster.Extensions.CommandLineUtils.CommandLineApplication+<>c__DisplayClass143_0.b__0 (System.Threading.CancellationToken _) [0x00000] in <21ffa10636d3445095cca7f9fdee08c0>:0
at McMaster.Extensions.CommandLineUtils.CommandLineApplication.ExecuteAsync (System.String[] args, System.Threading.CancellationToken cancellationToken) [0x000ba] in <21ffa10636d3445095cca7f9fdee08c0>:0
at McMaster.Extensions.CommandLineUtils.CommandLineApplication.Execute (System.String[] args) [0x00016] in <21ffa10636d3445095cca7f9fdee08c0>:0
at OmniSharp.CommandLineApplication.Execute (System.String[] args) [0x00081] in <4af76a30ecc847bf90ccfd5e2f8323eb>:0
at OmniSharp.Stdio.Driver.Program+<>c__DisplayClass0_0.b__0 () [0x00028] in <29e1c59102d54c138a063037d2e98dd9>:0
at OmniSharp.HostHelpers.Start (System.Func`1[TResult] action) [0x0001c] in <4af76a30ecc847bf90ccfd5e2f8323eb>:0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions