Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Target netstandard2.0 rather than net472 #2113

Closed
wants to merge 1 commit into from

Conversation

louis-z
Copy link
Contributor

@louis-z louis-z commented Jul 19, 2024

Targeting netstandard2.0 will make the library more versatile.

According to Microsoft's Cross-platform targeting recommendations:

Most general-purpose libraries don't need APIs outside of .NET Standard 2.0. .NET Standard 2.0 is supported by all modern platforms and is the recommended way to support multiple platforms with one target.

Closes #2035

Targeting netstandard2.0 will make LibGit2Sharp more versatile.
@louis-z louis-z marked this pull request as ready for review July 19, 2024 14:19
@bording
Copy link
Member

bording commented Jul 19, 2024

Thanks for the PR, but I'm not going to be taking this change.

LibGit2Sharp is not a typical library and must know what underlying platform it's being run on to ensure that the native libraries are loading properly, so it very intentionally doesn't target netstandard2.0 at this point.

The changes you've made in this PR would result in a non-functional assembly if you tried to use the netstandard2.0 target on something like an earlier version of .NET Core, for example.

@bording bording closed this Jul 19, 2024
@louis-z
Copy link
Contributor Author

louis-z commented Jul 19, 2024

Thanks for the PR, but I'm going to be taking this change.

LibGit2Sharp is not a typical library and must know what underlying platform it's being run on to ensure that the native libraries are loading properly, so it very intentionally doesn't target netstandard2.0 at this point.

The changes you've made in this PR would result in a non-functional assembly if you tried to use the netstandard2.0 target on something like an earlier version of .NET Core, for example.

I kind of suspected as much, but since all tests were green I thought maybe it was fine after all...

@bording, do you have any idea when the issue will be resolved? This is kind of a blocker for us right now.

@bording
Copy link
Member

bording commented Jul 19, 2024

I kind of suspected as much, but since all tests were green I thought maybe it was fine after all...

The tests only run against net472 and net6.0+ so you wouldn't see any failures.

@bording, do you have any idea when the issue will be resolved? This is kind of a blocker for us right now.

What issue? From my perspective there is no issue to be solved. How is this blocking you?

EDIT: I just noticed a (rather large) typo in my first comment: I'm not going to be taking this change, sorry for any confusion there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

LibGit2Sharp should target netstandard
2 participants