project-system icon indicating copy to clipboard operation
project-system copied to clipboard

"View In Object Browser" does not work for assemblies within packages

Open davkean opened this issue 9 years ago • 18 comments

  1. Create new Console App (.NET Core)
  2. Add a package reference
  3. Expand Dependencies -> NuGet
  4. Right-click on the package choose View in Object Browser
  5. Nothing happens
  6. Expand the package to show its inner assemblies
  7. Right-click on one of those assemblies
  8. Unable to select View in Object Browser

There are two action items here:

  • [x] Disable "View in Object Browser" for package nodes (PR #5533)
  • [ ] Enable "View in Object Browser" for package's child assembly nodes

davkean avatar Jan 19 '17 10:01 davkean

dupe/related of this one https://github.com/dotnet/roslyn-project-system/issues/403

abpiskunov avatar Jan 19 '17 19:01 abpiskunov

I don't think this is a dupe, at least in the assembly/project version we should just use the existing infrastructure to open them. In this case, what would we even do? Loop over every reference and view them?

davkean avatar Jan 20 '17 04:01 davkean

sure. For package i was planning to hide it as part of #403. Let's keep this issue to split the work and simplify reviews :)

abpiskunov avatar Jan 20 '17 18:01 abpiskunov

Note: after cross targeting dependencies change , View in object browser needs to be handled on roslyn side completely for any kind of dependencies: assemblies and project we support it, for packages don't show context menu at all. CPS implementation of this command really hardcoded to IProjectItemTree , but we have IProjectItemTree items only for active target , not for others.

We need

  • handle command ourselves to control visibility http://index/?rightProject=Microsoft.VisualStudio.ProjectSystem.VS.Implementation&file=Package%5cComponents%5cDefaultCommandSet2KHandler.cs&line=133
  • handle actual command execution to show assembly or project in Object browser http://index/?rightProject=Microsoft.VisualStudio.ProjectSystem.VS.Implementation&file=Package%5cComponents%5cDefaultVsUIHierarchyWindowCmdsHandler.cs&line=175

abpiskunov avatar Apr 07 '17 22:04 abpiskunov

@abpiskunov The links provided are broken.

BenjaminHolland avatar Jun 18 '17 19:06 BenjaminHolland

Find files and lines from links in actual CPS code instead of index please.

abpiskunov avatar Jun 18 '17 22:06 abpiskunov

@BenjaminHolland These are internal links to non-OSS.

davkean avatar Jun 19 '17 00:06 davkean

This is still and issue for aspdotnetcore projects, and it just does not navigate.

It works for first 5-10, navigation, then after adding new classes etc, it stops working.

any improvement or workaround for this?

reyou avatar Jan 13 '19 20:01 reyou

This is an issue for me in Visual Studio 2019 Preview. I can browse the NuGet dependency fine in VS 2017, but nothing happens in 2019.

fmicle avatar Apr 16 '19 16:04 fmicle

Screenshot

image

fmicle avatar Apr 16 '19 16:04 fmicle

I have this same issue in VS 2019.

capinredbeard avatar Jun 22 '19 00:06 capinredbeard

2.5 years and many Visual Studio versions later and this serious bug still has not been addressed

v-kydela avatar Jul 17 '19 19:07 v-kydela

How are we supposed to determine the exports of a third party assembly, ildasm?

18549 avatar Jul 31 '19 13:07 18549

Legacy does not include the View in Object Browser context menu item for package references.

When using the old-style packages.config, direct assembly references were added to the project as top-level items, and these would support the object browser.

Unlike legacy, the new project system allows expanding package references to see their inner assemblies. It may be possible to navigate to the object browser from a child assembly directly.

drewnoakes avatar Aug 01 '19 03:08 drewnoakes

I'm trying to view the contents of a referenced DLL in an ASP.NET Core 3.1 project in Visual Studio 2019, but Solution Explorer gives me nothing to go on

image

This used to be done via Object Browser, but that gives me no information at all (not even about my own project).

image

Was this feature dropped?

JohannSig avatar May 28 '20 13:05 JohannSig

@JohannSig the lack of this feature is what this issue is tracking.

In 16.7 we will show considerably more info in the tree for all dependencies, including packages. Each assembly in the package will be visible. We want to add this feature to those nodes.

drewnoakes avatar May 29 '20 20:05 drewnoakes

I have "Version 16.7.0 Preview 3.1" of VS. I cannot expand a package reference added nuget package (to see assemblies). I get the following error (even after building / install) upon double click of the package (object browser isn't an option in the right click menu, if it is supposed to be).

image

image

ShiningMassXAcc avatar Jul 09 '20 23:07 ShiningMassXAcc

@ShiningMassXAcc from your screenshot I see that you're using the 'legacy' project system (it has a "References" node, not a "Dependencies" node).

The improved behaviour is in the .NET Project System (which lives in this repo).

Expandable packages are provided by this project system only. To use it, you would update your projects to be SDK-style.

Note that "View in Object Browser" for those assemblies is still not implemented in this project system.

drewnoakes avatar Jul 10 '20 02:07 drewnoakes