dotnet / dotnet/project-system
We return different browse objects depending how you query them
- Dominant language
- C#
- Stars
- 1k
- Forks
- 415
- PR merge metrics
- No merged PRs in 30d
Description
Our implementation of how we implemented project and configuration properties is a mismatch of confusing types. As we bring up legacy compat we need to make sure behavior remains identical, regardless of whether you retrieve objects via IVsHierarchy or via DTE.
Here's our current state:
Object | Description | CPS Implementation | Owner | Legacy Implementation
------------------------------------------------------------ |------------------------------------|----------------------------------------------------------------------------|-------|---------------------------------------------
EnvDTE.Project | Project Automation Object | `OAProject : EnvDTE.Project, EnvDTE.ISupportVSProperties` | CPS | `VBProject : EnvDTE.IDispatch, ISupportVSProperties`
EnvDTE.Project.Object | Project VS Automation Object | `VSProject : VSLangProj.VSProject, VSLangProj.ProjectProperties` | ML | `CVsExtVSProject : VSLangProj.VSProject`
EnvDTE.Project.Properties | Project Browse Object (1) | `DynamicTypeBrowseObject : IVsBrowseObject, IDispatch` | CPS | `CVSProjectProperties : IVsBrowseObject, IDispatch, VSLangProj.ProjectProperties`
`(EnvDTE.Project.Object as VSLangProj.ProjectProperties)` | Project Browse Object (2) | `VSProject : VSLangProj.VSProject, VSLangProj.ProjectProperties` | ML | N/A
EnvDTE.Configuration | Configuration Automation Object | `CConfigurationAssignmentExt : EnvDTE.Configuration` | Plat | `CConfigurationAssignmentExt : EnvDTE.Configuration`
EnvDTE.Configuration.Object/EnvDTE.Configuration.Properties | Configuration Browse Object (1) | `AbstractProjectConfigurationProperties : ProjectConfigurationProperties3` | ML | `CVSProjectConfigProperties : IVsCfgBrowseObject, IDispatch, ProjectConfigurationProperties3`
Cast IVsProjectCfg to IVsCfgBrowseObject (does anyone do that?) | Configuration Browse Object (2) | `ProjectConfig : IVsCfgBrowseObject` | CPS | N/A
For both project and configs, we have two representations of our browse objects depending where you get the object from. We shouldn't have that concept, we should do the following:
- [ ] Split VSLangProj.VSProject and VSLangProj.ProjectProperties - these are two different objects.
- [ ] Merge DynamicTypeBrowseObject and our version of VSLangProj.ProjectProperties either via composition or COM aggregation
- [ ] Move IVsCfgBrowseObject (and IVsBrowseObjectContext?) to AbstractProjectConfigurationProperties
- [ ] Support IDispatch delegation on browse objects for ProjectProperties, ProjectConfigurationProperties3, etc so that have to stop implementing properties over and over again (nice to have)
Contributor guide
Assessment
This issue has not been assessed yet.