Exclude EF Core migration from Visual studio code (omnisharp) analysis

Viewed 363

I have a project which uses .Net Core with EF Core. I am developing this project with Visual Studio Code. Project evolves quickly and has a lot of migrations created. Each migration creates metadata file (*.Designer.cs) which is quite huge compared to migration itself. I have noticed that more migrations the project has the slower is VS Code load time and general responsiveness. My guess is that c# analyzer - Omnisharp tries to analyze *.Designer.cs files and that takes time and CPU resources. Those files are auto generated and completely useless in the perspective of code analysis. Also migration project is by far largest project in the source code.

I want to exclude migration project (or at least *.Designer.cs files) from Omnisharp analysis. Is there any way to do so?

Details:

  • OS: Windows 10
  • VS Code version: 1.46.1
  • EF Core version: 2.2.3
  • EF Core migration are in the separate project

Project structure:

- MyProject.Api
  - ...
  - Startup.cs
  - MyProject.Api.csproj
- MyProject.DatabaseMigration
  - Migrations
    - 2020..01_MyMigration.cs
    - 2020..01_MyMigration.Designer.cs
  - MyProject.DatabaseMigration.csproj
- MyProject.RandomDomain
  - ...
  - MyProject.RandomDomain.csproj
- MyProject.sln

Considered solutions:

0 Answers
Related