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

Show FrameworkReference version in Solution Explorer #2248

Closed
davidfowl opened this issue May 21, 2017 · 56 comments
Closed

Show FrameworkReference version in Solution Explorer #2248

davidfowl opened this issue May 21, 2017 · 56 comments
Assignees
Labels
Bug This is a functional issue in already written code. Feature-Dependency-Node "Dependencies" node in Solution Explorer that display project, binary & package references

Comments

@davidfowl
Copy link
Member

image

Visual Studio for MAC does this and it's super useful:

image

@DamianEdwards
Copy link
Member

Why are we calling it The SDK though, it isn't. Those versions are different, but I'd like to see them all.

@davkean
Copy link
Member

davkean commented May 21, 2017

Agreed @davidfowl I found this missing too.

@DamianEdwards What do you mean?

@DamianEdwards
Copy link
Member

Maybe it's fine now that we're attempting to unify version numbers better, but for a long time the actual SDK version was different to the shared framework version (which is what Microsoft.NETCore.App actually is). The SDK is actually Microsoft.Net.SDK

@srivatsn srivatsn added the Bug This is a functional issue in already written code. label May 22, 2017
@srivatsn srivatsn added this to the 15.3 milestone May 23, 2017
@MattGertz MattGertz modified the milestones: 15.6, 15.3 May 28, 2017
@MattGertz
Copy link

Post-15.3, please. (15.4 would be OK.) It's a great idea, but this is borderline feature work and you already have great quantities of bugs to push through for 15.3 shutdown.

@tmeschter
Copy link
Contributor

@davidfowl @DamianEdwards @davkean So what should we show next to "Microsoft.NETCore.App", since the version of the SDK and the version of Microsoft.NETCore.App could be different?

I'm inclined to show the actual version of Microsoft.NETCore.App, and show the actual SDK version in the SDK node (e.g. "SDK (1.1.1)") or perhaps just show it in the property grid when you select the SDK node.

tmeschter added a commit to tmeschter/roslyn-project-system that referenced this issue Sep 8, 2017
Related to dotnet#2248.

Currently we include the version number in the caption for _package_ items under the Dependencies node in Solution Explorer, like this:

> StyleCop.Analyzers (1.0.2)

However, we don't do the same thing for items under the SDK node. In this case the model for SDK dependencies supports a version number; we just need to update the caption to show it.

Note that the SDK dependencies are ultimately backed by items produced by the `CollectSDKReferencesDesignTime` task in the [dotnet/sdk](https://github.com/dotnet/sdk) repo, and these items currently do not include `Version` metadata. That will go in as a separate change, and only once both of these changes come together will you see the version number in Solution Explorer.
@tmeschter
Copy link
Contributor

PR #2807 will add the version to the captions of items under the SDK node.

Is it useful to show the SDK version on the SDK node itself?

tmeschter added a commit to tmeschter/sdk that referenced this issue Sep 8, 2017
Related to dotnet/project-system#2248.

When generating MSBuild items representing SDK references make sure to pass along the Version metadata. This way we can display it in Solution Explorer and the Properties window.
@davidfowl
Copy link
Member Author

davidfowl commented Sep 9, 2017

Is it useful to show the SDK version on the SDK node itself?

@tmeschter yes. There are actually 2 versions:

  • The SDK version
  • The runtime version (Microsoft.NETCore.App)

Both of these today are nearly impossible to figure out what VS chose to use without looking at an msbuild diagnostics log. We need to show both of these versions in the IDE.

@tmeschter
Copy link
Contributor

@davidfowl OK. PR #1572 will address the runtime version (well, that PR plus a small change to the SDK).

Now I'm trying to figure out if the SDK version is available in an MSBuild property.

@tmeschter
Copy link
Contributor

Sounds like further work on this is blocked by https://github.com/dotnet/cli/issues/7051.

@dsplaisted
Copy link
Member

I'm not sure it's going to be too helpful to show these versions. If you target .NET Standard 1.4, you will see the package version as 1.6.1. You have to expand the dependency tree to find it though, so hopefully not too many people will be confused by it.

@davidfowl
Copy link
Member Author

I'm not sure it's going to be too helpful to show these versions. If you target .NET Standard 1.4, you will see the package version as 1.6.1. You have to expand the dependency tree to find it though, so hopefully not too many people will be confused by it.

Why would it not be helpful to show the effective version of the SDK and runtime? It's as useful as the package versions. It's required to do any reasonable diagnostics. The last time I asked @nguerrera how I figure out what version of the SDK was being used by VS there was a pause. It shouldn't require any though to figure that out because it should be obvious in the UI 😄 .

Here's what jetbrains rider shows:

image

@tmeschter
Copy link
Contributor

Moving further work out to 15.6. This no longer meets the bar for 15.5.

@tmeschter tmeschter modified the milestones: 15.5, 15.6 Oct 2, 2017
@davidfowl
Copy link
Member Author

Damn

@Pilchie Pilchie modified the milestones: 15.6, Unknown Dec 20, 2017
@Pilchie Pilchie added Area-New-Project-System Feature-Dependency-Node "Dependencies" node in Solution Explorer that display project, binary & package references labels Dec 20, 2017
@jjmew jjmew modified the milestones: 16.0, 16.X Feb 13, 2019
@drewnoakes
Copy link
Member

With the introduction of FrameworkReferences the SDK node is no longer going to show targeting packs and will only show extension SDKs.

I don't see any actionable task from this issue so will close it.

@Pilchie
Copy link
Member

Pilchie commented Jun 26, 2019

@drewnoakes is there still something tracking the desire to know what SDK is going to get used? The issue is that with global.json, the “use previews” option, etc, it can be hard to know what SDK the resolver actually ended up picking. I’ve seen several requests on twitter and Github asking for that, and I thought that’s what this tracked.

@davkean
Copy link
Member

davkean commented Jun 26, 2019

Agreed this is tracking different work.

@davkean davkean reopened this Jun 26, 2019
@drewnoakes
Copy link
Member

The tracking of MSBuild project SDKs is in #3463.

@davidfowl
Copy link
Member Author

It still doesn’t show the shared framework version. The dependencies node for 3.0 ASP.NET Core applications are pretty broken

@drewnoakes
Copy link
Member

The version of the shared framework will be visible in the property pages. The concensus appears to be that the version of the shared framework would not be useful to most users and at worst, confusing.

The dependencies node for 3.0 ASP.NET Core applications are pretty broken

Could you elaborate? We're currently waiting for merged MSBuild and SDK changes to be inserted to fully enable the project system feature.

@davidfowl
Copy link
Member Author

davidfowl commented Jul 1, 2019

Lets say I want to answer the question: "What version of ASP.NET Core and .NET Core am I using".

Here's a file new empty ASP.NET Core 3.0 project:

image

image

Where do I look?

@davidfowl
Copy link
Member Author

  • There's no ASP.NET Core shared framework version
  • There's no .NET Core shared framework version
  • There's no SDK version
  • The dependencies node has only analyzers

There's target framework...

@jmarolf
Copy link
Contributor

jmarolf commented Jul 1, 2019

@davidfowl the build you are using doesn't have the Framework reference support yet. Any new 16.3 build (from master) should have these fixes but I'm not convinced that we show the info you want in those builds

What version of ASP.NET Core and .NET Core am I using

So we can show you

  1. The SDK version you are building with
  2. The version of the runtime you would be using in a self-contained publish scenario
  3. The version of the runtime assemblies that the SDK picked for you based on your combination of SDK and Framework References
  4. The Target Framework that your app is building against

I am making the assumption that you want to be shown 3 since that is the closest to what is shown for nuget packages (but please correct me if I am wrong).

For nuget packages there is only really one thing that makes sense to show, the nuget package version. Its also something that is actionable. The user may need to reason about their package versions and make changes to their dependencies.

For framework references its unclear to me what the user is going to do with this information. The only knob that is available to them is changing their TFM. One of the points of Framework References is that the user is auto-migrated to newer runtimes and packages as security fixes are released, so while we should have a plan for how all four categories of info are accessible from VS I am not convinced that the project tree nodes is the ideal place. Feel free to correct me where I am wrong or made incorrect assumptions tho :)

@davidfowl
Copy link
Member Author

Thanks for the reply! Yes I'm sad that of those 4 things you listed, none of them show me what I'm looking for. We have dotnet --info:

.NET Core SDK (reflecting any global.json):
 Version:   3.0.100-preview7-012715
 Commit:    1ee9aab9cb

Runtime Environment:
 OS Name:     Windows
 OS Version:  10.0.17134
 OS Platform: Windows
 RID:         win10-x64
 Base Path:   C:\Program Files\dotnet\sdk\3.0.100-preview7-012715\

Host (useful for support):
  Version: 3.0.0-preview7-27826-20
  Commit:  ee0c7ead1a

.NET Core SDKs installed:
  2.1.403 [C:\Program Files\dotnet\sdk]
  2.1.500 [C:\Program Files\dotnet\sdk]
  2.1.502 [C:\Program Files\dotnet\sdk]
  2.1.503 [C:\Program Files\dotnet\sdk]
  2.1.504 [C:\Program Files\dotnet\sdk]
  2.1.505 [C:\Program Files\dotnet\sdk]
  2.1.600-preview-009497 [C:\Program Files\dotnet\sdk]
  2.1.600 [C:\Program Files\dotnet\sdk]
  2.1.601 [C:\Program Files\dotnet\sdk]
  2.1.602 [C:\Program Files\dotnet\sdk]
  2.1.700-preview-009597 [C:\Program Files\dotnet\sdk]
  2.1.700-preview-009601 [C:\Program Files\dotnet\sdk]
  2.1.700-preview-009618 [C:\Program Files\dotnet\sdk]
  2.1.700 [C:\Program Files\dotnet\sdk]
  2.1.800-preview-009677 [C:\Program Files\dotnet\sdk]
  2.1.800-preview-009696 [C:\Program Files\dotnet\sdk]
  2.2.100 [C:\Program Files\dotnet\sdk]
  2.2.102 [C:\Program Files\dotnet\sdk]
  3.0.100-preview7-012715 [C:\Program Files\dotnet\sdk]

.NET Core runtimes installed:
  Microsoft.AspNetCore.All 2.1.5 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
  Microsoft.AspNetCore.All 2.1.6 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
  Microsoft.AspNetCore.All 2.1.7 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
  Microsoft.AspNetCore.All 2.1.8 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
  Microsoft.AspNetCore.All 2.1.9 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
  Microsoft.AspNetCore.All 2.1.11 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
  Microsoft.AspNetCore.All 2.2.0 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
  Microsoft.AspNetCore.All 2.2.1 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
  Microsoft.AspNetCore.App 2.1.5 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 2.1.6 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 2.1.7 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 2.1.8 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 2.1.9 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 2.1.11 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 2.2.0 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 2.2.1 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 3.0.0-preview-19054-0257 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 3.0.0-preview-19055-13 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 3.0.0-preview-19055-14 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 3.0.0-preview-19056-06 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 3.0.0-preview-19058-39 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 3.0.0-preview-19058-58 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 3.0.0-preview-19058-73 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 3.0.0-preview-19059-33 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 3.0.0-preview-19059-78 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 3.0.0-preview-19067-0383 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 3.0.0-preview7.19329.2 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 2.1.5 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 2.1.6 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 2.1.7 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 2.1.8 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 2.1.9 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 2.1.11 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 2.2.0 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 2.2.1 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 3.0.0-preview-27219-3 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 3.0.0-preview7-27826-20 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.WindowsDesktop.App 3.0.0-preview5-27618-09 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
  Microsoft.WindowsDesktop.App 3.0.0-preview5-27619-03 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
  Microsoft.WindowsDesktop.App 3.0.0-preview5-27619-12 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
  Microsoft.WindowsDesktop.App 3.0.0-preview7-27826-20 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]

Now I'm not saying we need to show this information but it should be the starting point of all relevant information that we can show users. This shows all possible options but visual studio picked a specific SDK and the application is targeting specific versions of each framework reference (not specifically the version that you will run on, we know that's a different story).

For nuget packages there is only really one thing that makes sense to show, the nuget package version. Its also something that is actionable. The user may need to reason about their package versions and make changes to their dependencies.

👍

For framework references its unclear to me what the user is going to do with this information. The only knob that is available to them is changing their TFM. One of the points of Framework References is that the user is auto-migrated to newer runtimes and packages as security fixes are released, so while we should have a plan for how all four categories of info are accessible from VS I am not convinced that the project tree nodes is the ideal place. Feel free to correct me where I am wrong or made incorrect assumptions tho :)

I appreciate the fact that the TFM decides what version is being targeted but there's a need to understand what the specific versions are for a couple of reasons:

  • Pre-release versions. This information is critical when both us and users use preview versions our product to understand what the exact version of .NET Core is being used is.
  • Patched versions. When that 3rd slot of the version number changes, it would be amazing to know which patch is "in effect".

@jmarolf
Copy link
Contributor

jmarolf commented Jul 1, 2019

I appreciate the fact that the TFM decides what version is being targeted but there's a need to understand what the specific versions are for a couple of reasons

My initial though is to show all this information in the properties pane. Traditionally this was where this sort of info went in .NET Framework

image

This way users that need this information can access is easily without increasing the concept count for new users of .NET

@cartermp
Copy link
Contributor

cartermp commented Jul 1, 2019

@drewnoakes I don't have a build; are we showing child dependencies in framework references with your work? That feels like where we'd want people to look to be able to understand the version of ASP.NET Core they're referencing. If that isn't enough information to meet @davidfowl's requirement then we need to have a think about this, since people should be able to understand what they are referencing just by expanding nodes to see child dependencies.

@nguerrera
Copy link
Contributor

The framework targeting pack version will show in property pane already with latest bits, right?

@davidfowl
Copy link
Member Author

I have this in my runtimeconfig.json file:

{
  "runtimeOptions": {
    "tfm": "netcoreapp3.0",
    "framework": {
      "name": "Microsoft.AspNetCore.App",
      "version": "3.0.0-preview7.19329.2"
    },
    "configProperties": {
      "System.GC.Server": true
    }
  }
}

Microsoft.AspNetCore.App version 3.0.0-preview7.19329.2 will show up in the properties pane when I show details for the Microsoft.AspNetCore.App framework reference.

Can somebody send me a screenshot?

@davidfowl
Copy link
Member Author

Will it also have the path to the shared framework or ref pack?

image

@drewnoakes
Copy link
Member

The framework targeting pack version will show in property pane already with latest bits, right?

yes, once all the latest bits (project system, MSBuild, SDK) are running in concert.

Are we showing child dependencies in framework references with your work?

Not yet. That's being tracked by #4444.

Will it also have the path to the shared framework or ref pack?

Yes. Without any further changes (beyond waiting for things to sync up) things will look as discussed here.

@davidfowl would that address your concerns? This is still an active area of development so we can continue to refine the experience. Once we see it running end to end we'll have a better sense of where it's lacking.

@davidfowl
Copy link
Member Author

I believe so, let me know when it's available in a build so I can give feedback as soon as possible 😄

@DamianEdwards
Copy link
Member

Given this is in master, I'm assuming it's not landing in d16.3 preview 1?

@drewnoakes
Copy link
Member

master is currently 16.3 so I believe the changes will be in d16.3p1.

@davidfowl
Copy link
Member Author

I have a version that shows framework refs without a version

@drewnoakes
Copy link
Member

@davidfowl the design is to show them without versions. Would you like to see a different behaviour? This was discussed and the conclusion was to omit them. Can you give an example where the version would be helpful? Note that the version will be available in the properties page soon.

@davidfowl
Copy link
Member Author

Can you give an example where the version would be helpful? Note that the version will be available in the properties page soon.

Why do I have versions next to my nuget packages? Why does dotnet --version and dotnet --info exist? It's extremely useful when diagnosing problems for both customers and us the framework owners. It's the first thing we ask people to when they file an issue. I can go on but I don't want to list the reasons why showing version numbers are useful. They really are especially when you can change what the effective version is by using a global.json.

I grab a repro and I want to know what version is in effect:

  • The SDK version chosen
  • The shared framework ref pack I'm compiling against

@drewnoakes
Copy link
Member

The idea was that users shouldn't be concerned with the version of a target framework. The version relates to their TFM, and seeing a number on the node can cause confusion in some cases. For example there was plenty of confusion when targeting netstandard1.3 and seeing a reference to NETStandard.Library version 1.6.1. So it's in that spirit that the version is not given prime screen real estate, yet is still available in the properties panel for users who want to know exactly what was resolved, and to help debug issues.

When I asked for an example, I was thinking that perhaps there's a case in ASP.NET Core that I'm not aware of where the version number is actually helpful for most users. I'm far more familiar with target frameworks for Microsoft.NETCore.App and the WinForms/WPF target frameworks where the version number isn't really helpful.

The SDK version chosen

This is being tracked in #3463

@drewnoakes drewnoakes changed the title Show the version of the SDK in the solution explorer Show FrameworkReference version in Solution Explorer Jul 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug This is a functional issue in already written code. Feature-Dependency-Node "Dependencies" node in Solution Explorer that display project, binary & package references
Projects
None yet
Development

No branches or pull requests