dotnet / dotnet/project-system
Block retrieving ProjectItem.FileCodeModel and Project.CodeModel until Roslyn is aware of the file
Open
Feature-Language-Service
Parity-Legacy-API
Parity-Legacy-Feature
Triage-Approved
- Dominant language
- C#
- Stars
- 1k
- Forks
- 415
- PR merge metrics
- No merged PRs in 30d
Description
We should block retrieving ProjectItem.FileCodeModel/Project.CodeModel until Roslyn has become aware of the file. This lets us provide the same guarantee as the legacy project system. Useful for extensions and wizards.
When testing this, please check two cases:
- [ ] When a Code Diagram is part of the "active" restored documents it displays an error due to CodeModel returning null.
- [ ] https://github.com/dotnet/project-system/issues/2999#issuecomment-389762981
- [ ] Reenable code fix in Roslyn that renames file to match type name
Contributor guide
Assessment
This issue has not been assessed yet.