dotnet / project-system

The .NET Project System for Visual Studio
MIT License
969 stars 387 forks source link

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

Open davkean opened 7 years ago

davkean commented 7 years ago
  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:

abpiskunov commented 7 years ago

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

davkean commented 7 years ago

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?

abpiskunov commented 7 years ago

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 commented 7 years ago

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

BenjaminHolland commented 7 years ago

@abpiskunov The links provided are broken.

abpiskunov commented 7 years ago

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

davkean commented 7 years ago

@BenjaminHolland These are internal links to non-OSS.

reyou commented 5 years ago

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?

fmicle commented 5 years ago

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 commented 5 years ago

Screenshot

image

capinredbeard commented 5 years ago

I have this same issue in VS 2019.

v-kydela commented 5 years ago

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

18549 commented 5 years ago

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

drewnoakes commented 5 years ago

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.

JohannSig commented 4 years ago

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?

drewnoakes commented 4 years ago

@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.

ShiningMassXAcc commented 4 years ago

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

drewnoakes commented 4 years ago

@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.