Skip to content

RFC: Change examples to use async/await pattern + drop VS2010 compatibility #381

Closed

Description

@perlun

Hi,

One question that has arisen after the discussion we had in #373 (as to the "be or not to be" for a locking-synchronous-Task-Wait-based approach), and the suggested approach for these kind of things for the future, is the way we we should recommend that these kind of things be done.

I mean, normally if you would have a method like this:

Task<string> GetSourceAsync()
{
    return "foo";
}

...which you would then call perhaps like this:

string source = await GetSourceAsync();

All fine and dandy. Only one problem:

  1. This requires VS2012 or newer, and
  2. It requires .NET 4.5, or the use of Microsoft.Bcl.Async which works quite well actually (using it personally).

In any way, I feel that since this is the "preferred approach" that we want to recommend people to use, it would be good if we would use it ourselves. 😃 So, here's my recommendation:

  1. We drop support for VS2010, and only support 2012 and 2013 onwards.
  2. We upgrade the example projects to use .NET 4.5, so we can go with async. Note: only the example projects; CefSharp still needs to be .NET 4.0 for a little while, since there might be user's who cannot upgrade to .NET 4.5 so easily (I happen to be one of them. 😉)

Comments?

Activity

  1. amaitland commented on Jun 2, 2014

    @amaitland
    Member

    What about keeping the core libraries at .Net 4.0, creating a separate solution -Core which maintains VS2010 support, then a separate -All solution that contains the Core + Examples, where the examples have been upgraded to .Net 4.5? Allows people that still require VS2010 to build CefSharp, and we can continue on our merry await way! 😄

    As it seems rare to add/remove projects from the solutions as it stands, maintaining two shouldn't be too much work.

    Thoughts?

  2. perlun commented on Jun 2, 2014

    @perlun
    MemberAuthor

    We could of course do it like that also, but it raises the bar a bit for contributing to the project. It's quite nice to just be able to open the .sln and hack away.

    Open question to everyone: How many of you are still using VS2010? (and have no access to VS2012 or 2013)
    If the number of people affected is low, it's not a big deal, then we just drop 2010 (since CEF is also moving towards 2013 AFAIK).

    Just to make it extremely explicit: 2010 users will still be able to use CefSharp as a consumer of the library (since it's .NET 4.0 for at least the near future), it's just that they won't be able to contribute to the project that might be a problem.

  3. amaitland commented on Jun 2, 2014

    @amaitland
    Member

    VS2012 and VS2013 here, only use VS2010 for legacy stuff (doesn't include CefSharp)

  4. ray007 commented on Jun 5, 2014

    @ray007

    VS2010 here and no chance to change that anytime soon.

  5. JanEggers commented on Jun 5, 2014

    @JanEggers
    Contributor

    personally i use vs 2013 so i dont mind dropping vs2010 support.

    We upgrade the example projects to use .NET 4.5, so we can go with async. Note: only the example projects;

    👍 it is up to the user to decide if they want to use await GetSourceAsync() or GetSourceAsync().ContinueWith()

    so i dont see any reason why we should upgrade cefsharp to 4.5 as long as we dont need any features of it.

  6. jornh commented on Jun 5, 2014

    @jornh
    Contributor

    👍 for the same reasons as Jan nicely summed up + we still have the MinimalExample repo.

    I think we can move this to 31.0.1 though - so that's how I marked it. It's not our contract, just polish of examples.

  7. added this to the milestone on Jun 5, 2014
  8. kropewnicki commented on Jun 5, 2014

    @kropewnicki
    Contributor

    I am using vs2010.

  9. amaitland commented on Jun 5, 2014

    @amaitland
    Member

    @kropewnicki Are you using VS2010 to compile CefSharp from source?

  10. kropewnicki commented on Jun 5, 2014

    @kropewnicki
    Contributor
  11. amaitland commented on Jun 6, 2014

    @amaitland
    Member

    @kropewnicki Are you simply building to get access to features in master or actually modifying the source code?

    If your just obtaining a build of master, then we can probably look at providing nightly builds available for download. Would that meet your requirements?

  12. kropewnicki commented on Jun 6, 2014

    @kropewnicki
    Contributor

    @amaitland
    I am compiling from master, I modified to use the some newer CEF binaries.

  13. perlun commented on Jun 9, 2014

    @perlun
    MemberAuthor

    OK. So we have at least two people @ray007 and @kropewnicki that are still using VS2010. Any reason that you cannot upgrade to either VS2012 or 2013? I guess you don't have MSDN partner download access or similar? (I do myself)

  14. 11 remaining items

  15. removed this from the 33.0.2 milestone on Oct 24, 2014
  16. modified the milestones: , 37.0.0, 3000 on Nov 11, 2014
  17. modified the milestones: 39.0.0, 3000 on Dec 22, 2014
  18. amaitland commented on Jan 6, 2015

    @amaitland
    Member

    For version 39 I'm going to upgrade the examples to .Net 4.5. The core libraries are still .Net 4.0.

    It's ticked over to 2015, so I think it's time, specially with the release of VS 2013 Community Edition allowing small companies and open source contributors free access to the equivalent of VS 2013 Professional

    http://www.visualstudio.com/en-us/news/vs2013-community-vs.aspx

  19. amaitland commented on Jan 6, 2015

    @amaitland
    Member

    Commit amaitland@fc65192 resolves this Issue.

  20. perlun commented on Jan 7, 2015

    @perlun
    MemberAuthor

    Great, thanks! I think we should not bump the core libraries to .Net 4.5 yet, unless it really causes problems for us to have them on 4.0.

    As for me - has been extremely unavailable from the project for the last few months. Will maybe come in for a minor return within the next few months, since we will start upgrading to CefSharp3 (i.e. 37 or 39 or whatever the version is nowadays. 😄) But anyway, don't count on me as a "major" contributor this year, but more a minor collaborator amongst the peers.

  21. jornh commented on Jan 7, 2015

    @jornh
    Contributor

    Agree! (on the 4.0 vs 4.5 situation)

    Anyho' good to "hear" from you @perlun 👍 ... I'm also still mostly lurking in the background 😵 and @amaitland + a few other semi-regular contributors have recently done a lot of good work!

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

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions