Skip to content

Issue Installing LibGit2Sharp 0.25.2 #1598

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

Closed
jspencer92 opened this issue Jul 24, 2018 · 2 comments
Closed

Issue Installing LibGit2Sharp 0.25.2 #1598

jspencer92 opened this issue Jul 24, 2018 · 2 comments

Comments

@jspencer92
Copy link

jspencer92 commented Jul 24, 2018

Reproduction steps

Attempt Nuget install of LibGit2Sharp 0.25.2 on project targeting .Net versions 4.5.x, 4.6.x, 4.7.x

Expected behavior

Install without error

Actual behavior

Install fails with error:
Could not install package 'LibGit2Sharp 0.25.2'. You are trying to install this package into a project that targets '.NETFramework,Version=v4.7.2', but the package does not contain any assembly references or content files that are compatible with that framework. For more information, contact the package author.

Version of LibGit2Sharp (release number or SHA1)

0.25.2

Operating system(s) tested; .NET runtime tested

Windows 7, VS2015, .Net 4.5.2, 4.6.1, 4.7.1, 4.7.2

@bording
Copy link
Member

bording commented Jul 24, 2018

You're still using Visual Studio 2015? You need additional tooling installed to work with .NET Standard 2.0 libraries.

First, you need to install NuGet 3.6.0: https://dist.nuget.org/visualstudio-2015-vsix/v3.6.0/NuGet.Tools.vsix

Once you have that installed, you should see a different error message telling you that you need to install something else to have .NET Standard 2.0 support, and it will include a link. Install that, and then you should be able to use any .NET Standard 2.0 library, including LibGit2Sharp.

If you want to target anything other than .NET Framework 4.7.2, then you'll also need to edit your project file and add <ImplicitlyExpandDesignTimeFacades>false</ImplicitlyExpandDesignTimeFacades> to a PropertyGroup in the file.

However, what you should really do is start using Visual Studio 2017 instead.

@jspencer92
Copy link
Author

Thanks for the quick reply. Hoping to upgrade to 2017 soon, but in the meantime your workaround works just fine.

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

No branches or pull requests

2 participants