Skip to content
This repository was archived by the owner on Jun 27, 2019. It is now read-only.
This repository was archived by the owner on Jun 27, 2019. It is now read-only.

Port to NETStandard #40

Closed
Closed

Description

@dazinator

Feature description

Port the solution NETStandard.
This will unlock ability to port GitVersionTask to .NETStandard.
This will unlock dotnet cli builds for projects that consume GitVersionTask

Here is the API Portability analysis: ApiPortAnalysis.xlsx

Activity

  1. dazinator commented on Jun 28, 2017

    @dazinator
    ContributorAuthor

    Need latest libgit2sharp nuget package (with supports for netstandard1.3) to be released.

  2. added a commit that references this issue on Jun 28, 2017
  3. dazinator commented on Jun 28, 2017

    @dazinator
    ContributorAuthor

    I have started work in a branch but it's not yet successfully building.

    1. Moved all the code into a netstandard 1.3 project, and deleted the net4, net45 and shared projects.
    2. Tried to resolve all compilation errors, by adding relevant dependencies back, however some aren't yet available..
    3. Added a polyfill for serialization attribute.. not sure if that is the correct way to handle this..

    Following cannot be resolved:

    1. LibGit2Sharp (awaiting nugget release with netstandard 1.3 support)
    2. [StringFormatMethod("format")] attribute (no idea how to replace this - perhaps need compilation directive.)
    3. using JetBrains.Annotations;
    4. SerializationInfo - (no idea how to replace this - perhaps need compilation directive.)
  4. dazinator commented on Jun 28, 2017

    @dazinator
    ContributorAuthor

    Have attached an API portability analysis: ApiPortAnalysis.xlsx

  5. pdrhsm commented on Jun 30, 2017

    @pdrhsm
    Contributor

    @dazinator
    2. StringFormatMethod is just a ReSharper helper-attribute as far as I know.
    3. Latest version, 10.4.0, supports netstandard1.0-- or one could remove the annotations.
    4. Just took a quick look,.. I can't see that WarningException ever gets serialized, but I might be missing something.

  6. dazinator commented on Jun 30, 2017

    @dazinator
    ContributorAuthor

    Yeah the serialisation constructor for exceptions used to be a best practice. Im not sure its required anymore though..

  7. conniey commented on Jun 30, 2017

    @conniey

    [StringFormatMethod("format")] attribute (no idea how to replace this - perhaps need compilation directive.)
    using JetBrains.Annotations;

    I would add a compiler directive for these ReSharper features based on the platform you are currently viewing in the editor, so at least if they switch to the full .NET Framework, these features will still work for them. (ie. #if NET45)
    [Edit: never mind from @pdrhsm 's comment it is supported on .NETStandard 1.0 now]

    image

    SerializationInfo - (no idea how to replace this - perhaps need compilation directive.)

    Since binary serialization is not supported until .NET Standard 2.0, I have been using compiler directives to comment this feature out

  8. JakeGinnivan commented on Jul 1, 2017

    @JakeGinnivan
    Contributor

    Happy to just remove all blockers, rather than solving

  9. pdrhsm commented on Jul 3, 2017

    @pdrhsm
    Contributor

    Removed SerializationInfo and updated to newer version of JetBrain.Annotations here.

    I was unable to push my commits to GitTools.Core@feature/netstandard.

    Edit: So it seems that all thats left now is waiting for LibGit2Sharp to release a nuget with netstandard support.

  10. conniey commented on Jul 3, 2017

    @conniey

    @pdrhsm As a workaround for LibGit2Sharp not having a Portable library... to continue working, in my GitTools.Testing PR, I modified the csproj to conditionally include the portable library version depending on the TargetFramework. GitTools.Testing.Tests.csproj#L32-L40

    Also, you should open a PR against feature/netstandard if you want to merge your changes in.

  11. dazinator commented on Jul 3, 2017

    @dazinator
    ContributorAuthor

    @pdrhsm I have submitted a PR on your behalf and merged those changes in, thank you.
    @conniey - good idea, I'll use the same approach for now.

  12. dazinator commented on Jul 3, 2017

    @dazinator
    ContributorAuthor

    Now that GitTools.Core is targeting netstandard1.3 - The GitTools.Core.Tests project which is net45 can't reference it. I'm going to re-target the tests project to net46 to resolve this..

  13. dazinator commented on Jul 3, 2017

    @dazinator
    ContributorAuthor

    The next blockers are all with ProcessHelper - it uses ProcessStartInfo, Process and it's kin. These are all not available until NETStandard2.0 - https://github.com/dotnet/corefx/issues/12797

    The sole usage for the ProcessHelper within GitTools.Core is for the DumpGraph() method - because it shells out to git.

  14. dazinator commented on Jul 3, 2017

    @dazinator
    ContributorAuthor

    Ok I think this can be reviewed now. I ended up removing DumpGraph on netstandard - because of the lack of system.diagnostic.process api's.

  15. dazinator commented on Jul 3, 2017

    @dazinator
    ContributorAuthor

    PR Submitted.

  16. dazinator commented on Jul 9, 2017

    @dazinator
    ContributorAuthor

    Waiting on GitTools/GitTools.Testing#6 to be merged, so can then get the tests on travis to run under netcoreapp.

  17. pdrhsm commented on Aug 4, 2017

    @pdrhsm
    Contributor

    @dazinator as far as I can see this seems to be done?

    If so; when can we expect as release?! 👍

  18. dazinator commented on Aug 4, 2017

    @dazinator
    ContributorAuthor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions