Skip to content

Consider providing a net461 moniker in nuget package #1605

Closed
@devlead

Description

@devlead

As per resent guidance provided by @terrajobst on Twitter recently

Main take aways

If you want to consume .NET Standard 1.5+ from .NET Framework, I recommend to be on 4.7.2.
If you dual target for .NET Standard and .NET Framework, you’ll get the best of both worlds.

Issue as a library author is many assemblies has dropped the .NET Framework monikers, libgit2sharp included, which means if I have libgit2sharp as a dependency, I myself can't target 4.6.1.

Did a quick PoC win fork devlead/libgit2sharp/cf417d65a2e2d8192e9b2676794372575d6ae49a, things seems to build & test locally.

Basic changes I did

https://github.com/devlead/libgit2sharp/blob/cf417d65a2e2d8192e9b2676794372575d6ae49a/LibGit2Sharp/LibGit2Sharp.csproj#L4

    <TargetFrameworks>netstandard2.0;net461</TargetFrameworks>

https://github.com/devlead/libgit2sharp/blob/cf417d65a2e2d8192e9b2676794372575d6ae49a/LibGit2Sharp/LibGit2Sharp.csproj#L41-L43

 <ItemGroup Condition=" '$(TargetFramework)' == 'net461' ">
    <PackageReference Include="System.Runtime.InteropServices.RuntimeInformation" Version="4.3.0" PrivateAssets="none" />
  </ItemGroup>

If this is something you might consider, I'll happily send in this as a PR.

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