dotnet / project-system

The .NET Project System for Visual Studio
MIT License
967 stars 386 forks source link

Enable multi-target framework selection via Application Property page #800

Open jinujoseph opened 7 years ago

jinujoseph commented 7 years ago

image

AraHaan commented 5 years ago

I would go for removing the drop down and replace it with a multi select list box alternative- and only list the frameworks supported by the latest version of the .NET core sdk the user has installed on their device.

I would PR at least a change to the UI and the generation of them as <TargetFramework> when only one is selected; and <TargetFrameworks> when multiple is selected. However to detect if a .NET core/standard style project to only show it like that cannot be too hard right?

Anyway where is the page located at in the sources?

As for detecting their SDK versions and reading what frameworks it supports; I got no idea, so it has to be passed to someone who knows about it more than me.

AlexanderTaeschner commented 5 years ago

For the new GUI it is essential that the order of the listed TFMs can also be defined. One possibility would be to have two lists side by side, one with the possible TFMs and one with the active ones where the ordering of the items can be adjusted.

AraHaan commented 5 years ago

or just hard code a possible order, where frameworks with framework in their name is 1st, core 2nd, and standard being last.

drewnoakes commented 5 years ago

Another approach would be to make this a combo box, where:

This would mean showing less friendly strings such as netstandard1.5 rather than .NETStandard 1.5.

Review discussion on #801.

AraHaan commented 5 years ago

hmm Or an EVEN better idea; what about a multi-select combo box?

Does multi-select combo boxes exist though? Even on the Windows API???

However I still think a multi-select listbox might be a better idea.

drewnoakes commented 5 years ago

The challenge with multi-selecting a combo box is that ordering matters. I can't think of a UI that allows multi-selection, specifying ordering and adding unknown items (you can define your own targets) better than a text box.

AlexanderTaeschner commented 5 years ago

Or a text box with some edit button beside it, which opens a small form with two side by side lists as described above. Then it is usable both for experts and beginners.

RussKie commented 5 years ago

Keep it simple :) If we know the order (which I think we do - netfx, netcore, netstardard) we only need a dropdown with a checkbox list. It doesn't matter in what order a users ticks items - we insert checked items in the right order.

drewnoakes commented 5 years ago

4960 is an example of when order matters.

RussKie commented 5 years ago

I stand corrected, thanks 👍

etbyrd commented 5 years ago

How about something similar to the reference paths property page:

You could have a picker that lets you choose the TFM and then order them how you need.

etbyrd commented 5 years ago

4960 is an example of when order matters.

Is that a good example, though? That seems like a reference manager bug. I think that we could reasonably just have a dialog with checkboxes.

etbyrd commented 5 years ago

Also this is related and possibly a dupe: https://github.com/dotnet/project-system/issues/3024

drewnoakes commented 5 years ago

That seems like a reference manager bug

Yes it's a bug.

I still prefer a text box but I understand it might not be the most friendly for folks who don't know TFMs.

If this is to be a multi-select UI of sorts (with or without ordering support) then the list of TFMs should be data driven so we don't have to roll out changes to the UI just so people can select new TFMs.

huoyaoyuan commented 4 years ago
image

Vote for JetBrains Rider's design. Prompting the user to edit project files is enough.