Skip to content

NuGet friendly names -> framework names should be statically calculated  #30

Closed

Description

@davkean

We want to use NuGet friendly names as part of the user-visible TFMs of the project file. Original proposal was to use a target to convert from them -> TFMs, however, that will cause no end of trouble for things that already expect TFMs to be static (common targets) and VS which will require a (slow) design-time build just to figure out what the real TFM is.

Instead we should see if we can come up with a mechanism where we can declare this statically use a series of properties + conditions and have it statically available.

Activity

  1. self-assigned this
    on Aug 9, 2016
  2. srivatsn commented on Aug 19, 2016

    @srivatsn
    Contributor

    @nguerrera - you'll need this for supporting cross-targeting

  3. nguerrera commented on Aug 19, 2016

    @nguerrera
    Contributor

    Perhaps we can generate the static logic rather than hand-authoring a copy of the mapping in msbuild xml.

  4. nguerrera commented on Aug 22, 2016

    @nguerrera
    Contributor

    Where is the source of truth for these mappings?

  5. eerhardt commented on Aug 22, 2016

    @eerhardt
    Member

    Where is the source of truth for these mappings?

    The best thing I know of is in NuGet. See the following PR that added 'netcoreapp1.0'.

    https://github.com/NuGet/NuGet.Client/pull/361/files

  6. nguerrera commented on Sep 2, 2016

    @nguerrera
    Contributor

    I have a strategy that can work for short TFMs of the form <name><version>, but not for PLIB profiles of the form <name1><version1>+...+<nameN><versionN>. To what extent do we need to support targeting these profiles with our sdk? Would it be acceptable if I assigned one canonical spelling to each PLIB profile and only recognized that exact spelling? i.e. no reordering of platforms or various other equivalences?

    @davkean

  7. davkean commented on Sep 2, 2016

    @davkean
    MemberAuthor

    I think project.json just pointed to the profiles themselves to build these, ie I don't think we need to support it - as long as there's a way to target just using the full name.

  8. abpiskunov commented on Sep 2, 2016

    @abpiskunov
    Contributor

    sdk already references nuget assemblies, why not use Nuget API for all framework names manipulations?

  9. nguerrera commented on Sep 2, 2016

    @nguerrera
    Contributor

    Hmm, supporting both full names and short names complicates things, but I think I can manage it.

    So, we support either "net45" or ".NETFramework,Version=v4.5", etc. for "netstandard" and a bunch more.

    but if you want to target a portable profile you have to use the long form ".NETFramework,Version=v4.5,Profile=Profile1"?

  10. nguerrera commented on Sep 2, 2016

    @nguerrera
    Contributor

    @abpiskunov Because the goal here is to be able to get the target frameworks during static evaluation.

  11. nguerrera commented on Sep 2, 2016

    @nguerrera
    Contributor

    Does anyone have a pointer to a project.json using a PLIB profile?

  12. added this to the milestone on Sep 16, 2016
  13. added a commit that references this issue on Jun 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions