Skip to content

DocumentSnapshot system needs to understands imports better #5095

@NTaylorMullen

Description

@NTaylorMullen

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

Metadata

Metadata

Assignees

Labels

Needs: DesignThis issue requires design work before implementating.area-mvcIncludes: MVC, Actions and Controllers, Localization, CORS, most templatesenhancementThis issue represents an ask for new feature or an enhancement to an existing onefeature-razor-pages

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions