Skip to content

Opt-in for ancient frameworks (I don't want them) #322

Closed

Description

@haf

I'm writing code on mono, which has a sort-of-4.0-4.5 framework target.

I'd be happy if I could avoid committing code like:

<When Condition="$(TargetFrameworkVersion) == 'v1.0'">

Realistically anything below .Net 3.5 (Windows Server 2008) should be opt-in. Especially since lower versions of their server OSes aren't supported and are likely to be attacked.

Frameworks I personally don't care about for new code:

  • Silverlight
  • .Net 1.0
  • .Net 1.1
  • .Net 2.0
  • .Net 3.5 (and SP2)
  • Portable subset / profiles (breaks more than if fixes)
  • Windows Phone

You probably need a switch between 4.0 and 4.5 since that's when it's not a framework anymore, but a runtime.


Here are some stats from the code I'm working on:

screen shot 2014-11-02 at 11 08 48

Left side: additions, right side: deletions.

Would it be feasible to specify a number of target frameworks in paket.dependencies and only have those targets generated in the files (and if it's just a single target, avoiding switches all-together)?

Activity

  1. forki commented on Nov 2, 2014

    @forki
    Member

    yes opting out might be a good idea.
    can you come up with a syntax for the dependencies file?

  2. haf commented on Nov 2, 2014

    @haf
    MemberAuthor

    clr 'net45' like bundler does with ruby '1.9.3'? http://bundler.io/v1.3/gemfile.html (bottom of page)

    The keys could be the same as in the nugets packages.

    For multiple targets:

    clr 'net40'
    clr 'net45'
    
  3. forki commented on Nov 2, 2014

    @forki
    Member

    @agross @ilkerde is this another case for "groups"?

  4. agross commented on Nov 2, 2014

    @agross
    Contributor

    @forki Rather not. Groups: production/dev dependencies. ruby/clr: Minimum supported platform version.

  5. cdrnet commented on Nov 2, 2014

    @cdrnet
    Member

    Shouldn't this go into the paket.references file instead of paket.dependencies?
    This is about controlling references not dependencies, and this way it can also be varied per project.

  6. forki commented on Nov 2, 2014

    @forki
    Member

    I assume in the end we will see both. Global settings and project specific
    settings
    On Nov 2, 2014 12:55 PM, "Christoph Ruegg" [email protected] wrote:

    Shouldn't this go into the paket.references file instead of
    paket.dependencies?

    —
    Reply to this email directly or view it on GitHub
    #322 (comment).

  7. forki commented on Nov 7, 2014

    @forki
    Member

    three question before I start:

    1. do we want to use clr prefix even with clr 'monoandroid'?
    2. is this something that is set for all nuget dependencies at the top of the paket.dependencies file?
    3. if we write clr 'net45' do we generate for monoandroid and portable?
  8. mexx commented on Nov 9, 2014

    @mexx
    Contributor

    Can we please name the option not clr, it's not correct, what we really means is the framework.
    CLR version is not Framework version, look http://msdn.microsoft.com/en-us/library/bb822049(v=vs.110).aspx
    A better name would be fx or framework.

  9. forki commented on Nov 9, 2014

    @forki
    Member

    I prefer framework

    1. and 3) is still open
  10. haf commented on Nov 9, 2014

    @haf
    MemberAuthor

    .Net 4.5 is a runtime though, not a framework, so that's not correct either, no matter what the MSDN page says (this is from speaking with Microsoft employees and common sense, too).

    You can't install 4.0 and 4.5 side-by-side, because 4.5 subsumes 4.0. For all intents and purposes there's really the CLR 2.0, 4.0 and 4.5 since 4.5 can't be run side-by-side with 4.0 and 4.5 added changes to how the clr works. 4.5 breaks 4.0 apps in general.

    MonoAndroid is an API-shim mostly, from what I understand.

    Given this, how about api 'net45 and api 'monoandroid'? Common ground?

  11. forki commented on Nov 9, 2014

    @forki
    Member

    api is quite nice - also shorter

    2014-11-09 14:08 GMT+01:00 Henrik Feldt [email protected]:

    .Net 4.5 is a runtime though, not a framework, so that's not correct
    either, no matter what the MSDN page says (this is from speaking with
    Microsoft employees and common sense, too).

    You can't install 4.0 and 4.5 side-by-side, because 4.5 subsumes 4.0. For
    all intents and purposes there's really the CLR 2.0, 4.0 and 4.5 since 4.5
    can't be run side-by-side with 4.0 and 4.5 added changes to how the clr
    works. 4.5 breaks 4.0 apps in general.

    MonoAndroid is an API-shim mostly, from what I understand.

    Given this, how about api 'net45 and api 'monoandroid'? Common ground?

    —
    Reply to this email directly or view it on GitHub
    #322 (comment).

  12. mexx commented on Nov 9, 2014

    @mexx
    Contributor

    @haf But is it about installed framework, isn't it about the target framework for compilation purposes?
    Further I mean people are familiar with the term framework, why introduce a new term and need to explain it to Paket users.

  13. haf commented on Nov 9, 2014

    @haf
    MemberAuthor

    It's about the APIs that you target; they change between different CLR versions and shims of the BCL. And afaik the mono-android targets mostly invoke the JVM behind the scenes?

    You ask about 'installed' versus 'targeted': we had to set up a server with the single purpose of not having .Net Framework 4.0 clobbered by WinRT/4.5. It didn't mattered that we 'targeted' 4.0, the compilation unit was still broken out of the compiler and crashed with strange error messages.

    That said, I could wager my pants that the Paket users understand the name 'api', too.

  14. forki commented on Nov 9, 2014

    @forki
    Member

    Ok. Let's move discussion to the actual feature.

    Given I write api "net45" in paket.dependencies - what would you expect to
    happen on install?
    On Nov 9, 2014 2:23 PM, "Henrik Feldt" [email protected] wrote:

    It's about the APIs that you target; they change between different CLR
    versions and shims of the BCL. And afaik the mono-android targets mostly
    invoke the JVM behind the scenes?

    You ask about 'installed' versus 'targeted': we had to set up a server
    with the single purpose of not having .Net Framework 4.0 clobbered by
    WinRT/4.5. It didn't mattered that we 'targeted' 4.0, the compilation unit
    was still broken out of the compiler and crashed with strange error
    messages.

    That said, I could wager my pants that the Paket users understand the name
    'api', too.

    —
    Reply to this email directly or view it on GitHub
    #322 (comment).

  15. haf commented on Nov 9, 2014

    @haf
    MemberAuthor

    I would probably think it meant I support net45 and upwards.

    I would not think it meant I support the various shims.

    I could imagine a number of flag for the API-shims:

    api 'net45', with: portable, androidmono
    

    How would you keep this list up-to-date? How do you declare that a shim subsumes another?

  16. forki commented on Dec 30, 2014

    @forki
    Member

    Since the impact is much smaller now I think we should close this one.

  17. haf commented on Dec 30, 2014

    @haf
    MemberAuthor

    Alright :)

  18. reopened this on Jan 29, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions