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

ToolLocationHelper.GetSupportedTargetFrameworks/GetPathToReferenceAssemblies are not aware of .NET Core #5750

Open
debonte opened this issue Sep 23, 2020 · 5 comments
Labels
For consideration Used for items on the backlog to raise them to the top of that list for discussion Partner request triaged

Comments

@debonte
Copy link

debonte commented Sep 23, 2020

Issue Description

ToolLocationHelper.GetSupportedTargetFrameworks and ToolLocationHelper.GetPathToReferenceAssemblies provide information about installed .NET Framework, UWP, and Silverlight frameworks, but not installed .NET Core frameworks.

Steps to Reproduce

On machine with .NET Core 3.1 installed, call:

  • ToolLocationHelper.GetSupportedTargetFrameworks();
  • ToolLocationHelper.GetPathToReferenceAssemblies(new FrameworkName(".NETCoreApp", new Version(3, 1)));

Expected Behavior

GetSupportedTargetFrameworks() returns a collection that includes .NETCoreApp,Version=v3.1.
GetPathToReferenceAssemblies returns a collection of paths to directories containing ,NET Core 3.1 reference assemblies.

Actual Behavior

GetSupportedTargetFrameworks() returns a collection that does not include any .NETCoreApp framework names.
GetPathToReferenceAssemblies returns an empty collection.

Versions & Configurations

Visual Studio 16.8.0 Preview 4.0 (main 30515.42)

@debonte debonte added bug needs-triage Have yet to determine what bucket this goes in. labels Sep 23, 2020
@debonte
Copy link
Author

debonte commented Sep 23, 2020

@davkean

@dsplaisted dsplaisted added For consideration Used for items on the backlog to raise them to the top of that list for discussion Partner request labels Sep 29, 2020
@benvillalobos benvillalobos removed the bug label Sep 30, 2020
@rainersigwald
Copy link
Member

What's the use case here? There are a bunch of differences in the build process between .NET (Core) and .NET Framework, and I don't think these APIs make sense in the new world. In particular, there's not really a single "reference assemblies" concept any more--things are resolved from targeting packs but also from NuGet packages, and having just "what's known to the current .NET Core SDK" returned here is likely insufficient.

@debonte
Copy link
Author

debonte commented Sep 30, 2020

I'm looking at updating Visual Studio's Choose Toolbox Items dialog to support WPF and WinForms .NET Core controls. At a high-level, the way it works today is:

  1. Enumerate installed frameworks
  2. Enumerate reference assemblies for each framework supported by Choose Toolbox Items (ex. Silverlight is ignored)
  3. Enumerate control types in those reference assemblies

@davkean knows of other scenarios where this type of info is needed. I believe dotnet/project-system#4873 covers some of them.

@davkean
Copy link
Member

davkean commented Oct 1, 2020

We can't even ask a very basic question of "can I use type X if I target Y?" where Y is a possible target. Regardless of whether these types come from packages/references/whatever there should a central place that can answer that question. It shouldn't up to each individual feature to hard code what is, what isn't available in .NET Core and how to add the right reference to add said type.

I see this no different to UWP where types come from a location different to the reference assemblies, and ToolLocationHelper has full support for it for extension and platform sdks.

@benvillalobos benvillalobos removed the needs-triage Have yet to determine what bucket this goes in. label Jul 28, 2022
@dreddy-work
Copy link
Member

Trying to get traction on this. We are seeing increasing customer reports seeking Visual Studio's Choose Toolbox Items dialog support for Winforms (and I assume WPF too) .NET projects.

@rainersigwald / @benvillalobos , any updates to this request?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
For consideration Used for items on the backlog to raise them to the top of that list for discussion Partner request triaged
Projects
None yet
Development

No branches or pull requests

7 participants