Skip to content

"Command line too long" error in C# 1.20.0 because of "files.exclude" setting #3127

Closed as not planned

Description

With the new feature to ignore all files in the files.exclude setting (#2171), projects will no longer load if too many files are exluded.

In my case, the files.exclude setting is around 6,400 characters long (depending on how it is serialized), which results in an error because the OmniSharp command line is too long.

According to this Windows support article, the maximum length is 8,191 characters and the only workaround is to pass the data via a local file instead.

As a workaround, users can downgrade to version 1.19.1 or shorten the number of files in their files.exclude setting.

Environment data

  • OS Name: Windows
  • OS Version: 10.0.18362
  • OS Platform: Windows
  • RID: win10-x64
  • VS Code version: 1.35.1
  • C# Extension version: 1.20.0

Steps to reproduce

  • Open a C# workspace in VS Code with a very long list of files and folders in the files.exclude setting.

Expected behavior

  • The project should load as expected.

Actual behavior

  • The following error message appears:
Starting OmniSharp server at 2019-6-19 09:33:43
    Target: d:\…\….sln

OmniSharp server started.
    Path: C:\Users\…\.vscode\extensions\ms-vscode.csharp-1.20.0\.omnisharp\1.32.20\OmniSharp.exe
    PID: 5076

Command line too long.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions