dotnet / dotnet/project-system

We return different browse objects depending how you query them

Open
#3,622 0 comments 0 reactions 0 assignees View on GitHub
Parity-Legacy-API Parity-Legacy-Feature Triage-Approved
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.