DocumentSnapshot system needs to understands imports better #5095
Labels
area-mvc
Includes: MVC, Actions and Controllers, Localization, CORS, most templates
enhancement
This issue represents an ask for new feature or an enhancement to an existing one
feature-razor-pages
Needs: Design
This issue requires design work before implementating.
Milestone
tl;dr; Getting imports today isn't guaranteed to be correct in the DocumentSnapshot world.
When you go through the process of adding documents to the project system you can get into an invalid state where documents you pull from the project system may generate invalid output. Basically, adding all .cshtml files => generating their output and then adding a _ViewImports.cshtml to the project system results in all of the previous files not seeing the _ViewImports.cshtml file.
So we need to design some mechanism when every time an important import file enters the system the ProjectSnapshotManager needs to update all documents in the project to be aware.
This isn't an issue in VS windows today because we don't rely on the DocumentSnapshot system for import updates.
/cc @rynowak @ajaybhargavb
The text was updated successfully, but these errors were encountered: