-
Notifications
You must be signed in to change notification settings - Fork 652
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
4.0.1-beta1-53: Fails to find the LibGit2Sharp. #1550
Comments
Same for me! I picked up beta-53 and get same issue. Have explicitly fixed dependency to be on beta-51 for the moment (which works). |
@kll can you have a look? |
Unfortunately I'm under a pretty big time crunch at work and don't have the time to look at other stuff. I also don't really use or understand how GitVersionTask works so I don't have much to go on. Just based on the error message though I followed a hunch and downloaded the gitversiontask-4.0.1-beta1-53.nupkg file and decompressed it to look at the files. The That's all the time I can spend on it for now but hopefully it points someone more knowledgeable than I in the right direction. |
Thanks, yes that's a good start, I'll try to find some time and check why it's not adding to the netstandard2.0 |
@LordMike can you try the new build 4.0.1-beta1-55? |
I now get this. While it's just a Warning, the build fails for completely different reasons - Jetbrains attributes are missing.. It still does build in
|
If 459bf46 managed to reduce the error to a warning, is this not a blocker anymore so we can continue as planned in #1422 (comment)? |
To be honest I would prefer to test it myself, just need a sample how to do that, so that next time I can confirm if it's working, @LordMike could you provide a sample of the project that has the GitVersion Task configured, as I prefer using the global tool instead of msbuild. |
We no longer use the task. It had some other rather horrendous implications, such as being very slow for multiple projects and not supporting parallel operations. As of this comment we moved to an entirely build-script managed approach, where the scripe (Nuke) handles the Gitversion CLI and does magic. So, right now, I won't be able to contribute a working (failing) example. Although, it shouldn't be hard to reproduce? |
using older GitTools.Core package instead of project
I was able to reproduce it locally, have create a sample console app with the GitVersionTask nuget package installed. I was able to fix it by partially reverting the commit related to .net standard 2.0 support. The 2.0 remains in place, the GitTools.Core is not included by source but using the nuget package, the old way. I'll try to fix GitTool.Core in it's repo, and then updated it in GitVersion. For now we'll use the older version of GitTools.Core |
@adamshergold can you test the version 4.0.1-beta1-59? I guess @LordMike will not be able to test it. |
Hi @arturcic ... i've tried with beta1-59 and it's okay IF I install libgit2-dev in the dotnet-sdk container before starting the build. I do this as part of my gitlab build steps: apt-get update If I don't do this then I get errors like this: MSBUILD : warning : WARN [01/24/19 10:57:21:20] Could not determine assembly version: System.TypeInitializationException: The type initializer for 'LibGit2Sharp.Core.NativeMethods' threw an exception. ---> System.DllNotFoundException: Unable to load shared library 'git2-15e1193' or one of its dependencies. In order to help diagnose loading problems, consider setting the LD_DEBUG environment variable: libgit2-15e1193: cannot open shared object file: No such file or directory [/builds/adamshergold/example.types/example.types.schema/example.types.schema.fsproj] Happy to give you access to my gitlab build if you want to look further and/or am very happy to help out with further investigation. thanks! |
That is expected, as I had to revert to older version of GitTools.Core nuget package that was using the old LibGit2Sharp. So it should work exactly the same as beta1-51, the one before the merge of #1422. I will try to update the GitTools.Core nuget package with the latest and then use it in GitVersion, hope we will not need to do the workaround |
So it is basically GitVersion on netstandard 2.0 using LibGit2Sharp version netstandard 1.3 I guess |
Sounds good. I'll stick with beta1-59 and the libgit2-dev install for the time-being. |
suggested solution with manual install doesn't work on alpine images |
@twsI use builds with two stages. The first one would rely on microsoft/dotnet:dotnet:2.2-sdk, the second one would be microsoft/dotnet:2.2-aspnetcore-runtime-alpine. This is the most painless solution I've found so far, with resulting image size being okay-ish. |
any updates on this? |
i'm using 5.0.0-beta2-75 on an ubuntu 14.04 build with libcurl3 installed but still getting
|
@adamshergold , @bonesoul can you try the latest version? |
As LibGit2Sharp was upgraded to version 0.26 in #1713, I think this problem is fixed. Please reopen this issue if the problem persists. |
@asbjornu looks like it's still happening with the vsts extension on Mac agents:
|
@sandorfr , do you mind giving a try to this one? https://marketplace.visualstudio.com/items?itemName=gittools.gitversion-preview |
@arturcic it was the was I tried for I actually switch to the normal one with 5.0 and it works. |
This compiled before lunch :P
The text was updated successfully, but these errors were encountered: