VsCode/Omnisharp doesn't respect excluded folders from project.json
See original GitHub issueEnvironment 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:
- Created 7 years ago
- Reactions:4
- Comments:7 (3 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Workaround: exclude on top-level…
"exclude": ["node_modules","..."], "dependencies": {
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.