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.

VsCode/Omnisharp doesn't respect excluded folders from project.json

See original GitHub issue

Environment data

dotnet --info output: .NET Command Line Tools (1.0.0-preview1-002702)

Product Information: Version: 1.0.0-preview1-002702 Commit Sha: 6cde21225e

Runtime Environment: OS Name: Windows OS Version: 10.0.10586 OS Platform: Windows RID: win10-x64

VS Code version: 1.2

C# Extension version: 1.1.5

Steps to reproduce

Download either protractor or create .cs file under folder that is excluded in Project.json from compile.

  "buildOptions": {
    "emitEntryPoint": true,
    "warningsAsErrors": true,
    "preserveCompilationContext": true,
    "compile": {
      "exclude": [
        "node_modules", 
        "obj", 
        "bower_components", 
        "wwwroot",
        "typings",
        "bin"
        ]
    }

Expected behavior

Vscode doesn’t show errors in “!” menu from excluded files.

Actual behavior

All errors are shown in files at excluded folders. Protractor in node_modules folder is pain because it contains lots of .cs files.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:4
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
code1linecommented, Sep 24, 2016

Workaround: exclude on top-level… "exclude": ["node_modules","..."], "dependencies": {

0reactions
DustinCampbellcommented, Feb 8, 2017

I don’t think we’re going to be addressing this issue for project.json-based .NET Core projects. Our focus has moved to better support for .csproj-based .NET Core porjects.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Omnisharp ignoring exclude options in omnisharp.json #1460
Tried using omnisharp.json in project folder and omnisharp.json in user folder. It does load RoslynExtensionOptions but FileOptions does not ...
Read more >
Omnisharp intellisense doesn't respect excluded folders
I'm using localhistory extension in vscode, but every file created by this extension is scanned by omnisharp. Unfortunately when localhistory ...
Read more >
[C#] How to exclude a folder? : r/vscode - Reddit
Omnisharp only reads the .csproj files but I searched through every .csproj in the Unity project and there was no sign of problem...
Read more >
Omnisharp Intellisense Doesn't Respect Excluded Folders - ADocLib
Support for project.json and csproj projects on Windows macOS and Linux.The C# extension is powered by OmniSharp.Get Started Writing C# in VS Code....
Read more >
How to stop omnisharp from scanning Temp/GeneratedCode ...
Disabling all vs code extensions except the C# extension but the problems persist. · Regenerate project files. · Add Temp/** to {files: exclude, ......
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