Project-system: Don't show unsupported target frameworks in properties pages

Created on 29 Sep 2019  路  7Comments  路  Source: dotnet/project-system

Visual Studio Version:16.3.1

Summary:

image

https://github.com/dotnet/core/blob/master/microsoft-support.md#end-of-support

Feature-Legacy-Application-Designer Triage-Won't-Fix

All 7 comments

Sounds reasonable. What do you think @jjmew @cartermp?

The proposal is to remove .NET Core 1.0, 1.1 and 2.0 from this drop down list as they are no longer supported.

@nguerrera this would be an SDK change, no? (Similar to https://github.com/dotnet/sdk/commit/11855b43a02b4d20c44c3bf3c4c70cd6191280c6).

What would we show if the target framework is one that is not supported. For example someone opens a project that is currently targeting .NET Core 1.0?

What about showing <TFM> (unsupported)?

Just my 2c, but I'm not a fan of doing anything for this, as I think it would be confusing. If I saw ".NET Core 1.0 (unsupported)" I would expect things to not work, or not compile. In reality it just means I might not get an answer if I ask Microsoft for help without first upgrading, and I suspect even that would not be true with enough money.

Issue #800 is tracking the need to support multi-targeting scenarios with this UI too. See also #3024.

Considering all of these at the same time, I vote again for a text box rather than a non-editable drop-down here.

It could be a combo box (i.e. has drop-down list, but can also edit text freely) containing a list of supported frameworks. If you are currently targeting something that's not in the list, that's fine. The combo box drop-down is just a convenient way to get to a valid value quickly, and to learn the kind of value that's allowed.

There's nothing stopping you adding multiple frameworks, custom frameworks, invalid frameworks, unsupported frameworks.

The label could be Target framework(s). If the entered text contains a semicolon, we would update the project file with <TargetFrameworks>, otherwise <TargetFramework>.

This would mean we'd show (for example) netstandard2.1 rather than .NET Standard 2.1. We'd also need another way to enact _Install other frameworks_.

I like @drewnoakes 's idea of a combo box. We only show valid values if you click around, but you can edit it manually if you like. Though that may raise the question of why we allow it to be editable in the first place, since that's never been done before.

Triage - After thinking more about it there seems to be no harm on showing all the available TFMs. That it is out of support doesn't mean that we shouldn't allow people to select it since there might be valid reason why they are choosing that.

Was this page helpful?
0 / 5 - 0 ratings