Skip to content

GitVersion Task 5.0.2 with .netcore 3 #1824

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
ladeak opened this issue Sep 25, 2019 · 12 comments
Closed

GitVersion Task 5.0.2 with .netcore 3 #1824

ladeak opened this issue Sep 25, 2019 · 12 comments

Comments

@ladeak
Copy link

ladeak commented Sep 25, 2019

Any updates when GitVersion is supported with .netcore 3 SDK?

==============================================================================
Task         : GitVersion Task
Description  : Easy Semantic Versioning (http://semver.org) for projects using Git
Version      : 5.0.2
Author       : GitVersion Contributors
Help         : See the [documentation](http://gitversion.readthedocs.org/en/latest/) for help
==============================================================================
C:\hostedtoolcache\windows\dotnet\dotnet.exe D:/a/_tasks/GitVersion_25b46667-d5a9-4665-97f7-e23de366ecdf/5.0.2/core/GitVersion.dll D:/a/1/s /output buildserver /nofetch
It was not possible to find any compatible framework version
The specified framework 'Microsoft.NETCore.App', version '2.1.0' was not found.
  - The following frameworks were found:
      3.0.0 at [C:\hostedtoolcache\windows\dotnet\shared\Microsoft.NETCore.App]

You can resolve the problem by installing the specified framework and/or SDK.

The .NET Core frameworks can be found at:
  - https://aka.ms/dotnet-download
##[error]Error: The process 'C:\hostedtoolcache\windows\dotnet\dotnet.exe' failed with exit code 2147516566
@arturcic
Copy link
Member

We're working on that. Hopefully I can find some spare time to target .net core 3.0 as well

@arturcic
Copy link
Member

#1849

@arturcic
Copy link
Member

@ladeak can you try version 5.0.2-beta.1+95 when it gets indexed?

@ladeak
Copy link
Author

ladeak commented Oct 10, 2019

I can give it a try next week.

@nZeus
Copy link

nZeus commented Oct 10, 2019

Trying to use GitVersion dotnet tool with .net core 3 sdk.

The 5.0.2-beta.1+95 throws a new exception:

Using Docker executor with image mcr.microsoft.com/dotnet/core/sdk:3.0 ...
Pulling docker image mcr.microsoft.com/dotnet/core/sdk:3.0 ...
Using docker image sha256:4422e7fb740c14af167b232a7b485d60a1a696a6507ee75e712817bd27dacdb5 for mcr.microsoft.com/dotnet/core/sdk:3.0 ...
...

$ dotnet tool restore
Tool 'gitversion.tool' (version '5.0.2-beta1.95') was restored. Available commands: dotnet-gitversion

Restore was successful.

$ dotnet tool run dotnet-gitversion /updateassemblyinfo /ensureassemblyinfo
INFO [10/10/19 18:18:06:48] Working directory: /builds/nZeus/simple-extensions/Sources
INFO [10/10/19 18:18:06:49] IsDynamicGitRepository: False
ERROR [10/10/19 18:18:06:51] An unexpected error occurred:
System.TypeInitializationException: The type initializer for 'LibGit2Sharp.Core.NativeMethods' threw an exception.
 ---> System.DllNotFoundException: Unable to load shared library 'git2-7ce88e6' or one of its dependencies. In order to help diagnose loading problems, consider setting the LD_DEBUG environment variable: libgit2-7ce88e6: cannot open shared object file: No such file or directory
   at LibGit2Sharp.Core.NativeMethods.git_libgit2_init()
   at LibGit2Sharp.Core.NativeMethods.InitializeNativeLibrary()
   at LibGit2Sharp.Core.NativeMethods..cctor()
   --- End of inner exception stack trace ---
   at LibGit2Sharp.Core.NativeMethods.git_buf_dispose(GitBuf buf)
   at LibGit2Sharp.Core.Proxy.git_buf_dispose(GitBuf buf)
   at LibGit2Sharp.Core.Handles.GitBuf.Dispose()
   at LibGit2Sharp.Core.Proxy.ConvertPath(Func`2 pathRetriever)
   at LibGit2Sharp.Core.Proxy.git_repository_discover(FilePath start_path)
   at LibGit2Sharp.Repository.Discover(String startingPath)
   at GitVersion.GitPreparer.GetProjectRootDirectory() in D:\a\1\s\src\GitVersionCore\GitPreparer.cs:line 160
   at GitVersion.Configuration.ConfigFileLocator.Verify(GitPreparer gitPreparer, IFileSystem fileSystem) in D:\a\1\s\src\GitVersionCore\Configuration\ConfigFileLocator.cs:line 56
   at GitVersion.Program.VerifyConfiguration(Arguments arguments, IFileSystem fileSystem) in D:\a\1\s\src\GitVersionExe\Program.cs:line 155
   at GitVersion.Program.VerifyArgumentsAndRun() in D:\a\1\s\src\GitVersionExe\Program.cs:line 101
INFO [10/10/19 18:18:06:52] 
INFO [10/10/19 18:18:06:52] Attempting to show the current git graph (please include in issue): 
INFO [10/10/19 18:18:06:52] Showing max of 100 commits

@arturcic
Copy link
Member

Unfortunately the mcr.microsoft.com/dotnet/core/sdk:3.0 image uses the Debian10 version that the library we rely on does not yet support. What I did as workaround in the PR for .net core 3.0 feature is I added .net core on top of a debian 9 that is supported and installed dotnet core and then the global tool works.

@ladeak
Copy link
Author

ladeak commented Oct 10, 2019

Ah, currently I am using the GitVersion (preview) task in AzureDevOps. Does that auto-pick up the new version as well? Or is there a way to "force" it to download the latest tool?

@arturcic
Copy link
Member

Can you try the new preview extension?
https://marketplace.visualstudio.com/items?itemName=gittools.usegitversion-preview

@ladeak
Copy link
Author

ladeak commented Oct 11, 2019

@arturcic I tested the beta package, looks good on my end. Thank you for the quick turnaround.

@arturcic
Copy link
Member

Great, we'll be deprecating the old extension (GitTools/GitVersion) in favor or the new one (GitTools/UseGitVersion)

@sheldonhull
Copy link

sheldonhull commented Feb 19, 2020

Is there anyone reason a new extension was needed instead of bumping the major version? I found it disruptive on the builds as I now have to update the actual extension instead of just GitVersion@5 for example? I'd like to understand if there is a limitation to the existing versioning as I've used that in the past with extensions to handle those breaking changes

@arturcic
Copy link
Member

The reason is the way we are publishing the tool has changed. Previously we were embedding the tool with all dependencies for all supported platforms, meaning it was a huge extension in size and we got to the size limit for an extension. We change the approach and now we install the tool from nuget as global tool. It's basically a new extension

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

4 participants