Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support navigating to Object Browser from the Dependencies tree #9602

Merged
merged 9 commits into from
Dec 5, 2024
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,10 @@
<Group guid="guidSHLMainMenu" id="IDG_VS_CTXT_ITEM_OBJECTBROWSER" priority="0x0100">
<Parent guid="guidSHLMainMenu" id="IDM_VS_CTXT_TRANSITIVE_ASSEMBLY_REFERENCE"/>
</Group>
<!-- Group added to transitive project references -->
<Group guid="guidSHLMainMenu" id="IDG_VS_CTXT_ITEM_OBJECTBROWSER" priority="0x0100">
<Parent guid="guidSHLMainMenu" id="IDM_VS_CTXT_PROJECTREFERENCE"/>
</Group>
<!-- This is the ordering group. Handles ordering files. -->
<Group guid="guidManagedProjectSystemOrderCommandSet" id="OrderingGroup" priority="0x100">
<Parent guid="guidSHLMainMenu" id="IDM_VS_CTXT_ITEMNODE" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,7 @@
ReadOnly="True"
Visible="False">
<StringProperty.DataSource>
<DataSource ItemType="ProjectReference"
PersistedName="Identity"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why were these two properties removed, ItemType and Persistence?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From memory this change makes the returned path be absolute rather than relative. Previously it returned the value of the <ProjectReference Include="../OtherProject/OtherProject.csproj"/> rather than the computed resolved path. We want the resolved path for the Object Browser.

Persistence="Intrinsic"
<DataSource PersistedName="Identity"
SourceOfDefaultValue="AfterContext" />
</StringProperty.DataSource>
</StringProperty>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ internal sealed class ProjectDependencyFactory : MSBuildDependencyFactoryBase
public const string AppliesTo = ProjectCapability.DependenciesTree + " & " + ProjectCapabilities.ProjectReferences;

private static readonly DependencyFlagCache s_flagCache = new(
resolved: DependencyTreeFlags.ProjectDependency + DependencyTreeFlags.SupportsBrowse,
unresolved: DependencyTreeFlags.ProjectDependency + DependencyTreeFlags.SupportsBrowse);
resolved: DependencyTreeFlags.ProjectDependency + DependencyTreeFlags.SupportsBrowse + DependencyTreeFlags.SupportsObjectBrowser,
unresolved: DependencyTreeFlags.ProjectDependency + DependencyTreeFlags.SupportsBrowse + DependencyTreeFlags.SupportsObjectBrowser);

public override DependencyGroupType DependencyGroupType => DependencyGroupTypes.Projects;

Expand Down