Repository navigation
Closed
Description
This compiled before lunch :P
> dotnet build
Microsoft (R) Build Engine version 15.9.20+g88f5fadfbe for .NET Core
Copyright (C) Microsoft Corporation. All rights reserved.
Restore completed in 24,17 ms for C:\Src\Project.csproj.
[NuGet Minimal]: Restoring packages for C:\Users\MichaelBisbjerg\.nuget\packages\gitversiontask\4.0.1-beta1-53\build\functionality\GitVersionBuild.targets...
[NuGet Minimal]: Restoring packages for C:\Users\MichaelBisbjerg\.nuget\packages\gitversiontask\4.0.1-beta1-53\build\functionality\GitVersionBuild.targets...
MSBUILD : warning : WARN [12/13/18 13:00:50:51] Could not determine assembly version: System.IO.FileNotFoundException: Could not load file or assembly 'LibGit2Sharp, Version=0.26.0.0, Culture=neutral, PublicKeyToken=7cbde695407f0333'. The system cannot find the file specified. [C:\Src\Project.csproj]
MSBUILD : warning : File name: 'LibGit2Sharp, Version=0.26.0.0, Culture=neutral, PublicKeyToken=7cbde695407f0333' ---> System.IO.FileNotFoundException: Could not load the specified file. [C:\Src\Project.csproj]
MSBUILD : warning : File name: 'LibGit2Sharp' [C:\Src\Project.csproj]
MSBUILD : warning : at System.Runtime.Loader.AssemblyLoadContext.ResolveUsingEvent(AssemblyName assemblyName) [C:\Src\Project.csproj]
MSBUILD : warning : at System.Runtime.Loader.AssemblyLoadContext.ResolveUsingResolvingEvent(IntPtr gchManagedAssemblyLoadContext, AssemblyName assemblyName) [C:\Src\Project.csproj]
MSBUILD : warning : at GitVersion.GitPreparer.GetDotGitDirectory() [C:\Src\Project.csproj]
MSBUILD : warning : at GitVersion.ExecuteCore.ExecuteGitVersion(String targetUrl, String dynamicRepositoryLocation, Authentication authentication, String targetBranch, Boolean noFetch, String workingDirectory, String commitId, Config overrideConfig, Boolean noCache) in C:\projects\gitversion\src\GitVersionCore\ExecuteCore.cs:line 33 [C:\Src\Project.csproj]
MSBUILD : warning : at GitVersion.ExecuteCore.TryGetVersion(String directory, VersionVariables& versionVariables, Boolean noFetch, Authentication authentication) in C:\projects\gitversion\src\GitVersionCore\ExecuteCore.cs:line 82 [C:\Src\Project.csproj]
MSBUILD : warning : [C:\Src\Project.csproj]
MSBUILD : warning : [C:\Src\Project.csproj]
MSBUILD : warning : WARN [12/13/18 13:00:50:54] Could not determine assembly version: System.IO.FileNotFoundException: Could not load file or assembly 'LibGit2Sharp, Version=0.26.0.0, Culture=neutral, PublicKeyToken=7cbde695407f0333'. The system cannot find the file specified. [C:\Src\Project.csproj]
MSBUILD : warning : File name: 'LibGit2Sharp, Version=0.26.0.0, Culture=neutral, PublicKeyToken=7cbde695407f0333' ---> System.IO.FileNotFoundException: Could not load the specified file. [C:\Src\Project.csproj]
MSBUILD : warning : File name: 'LibGit2Sharp' [C:\Src\Project.csproj]
MSBUILD : warning : at System.Runtime.Loader.AssemblyLoadContext.ResolveUsingEvent(AssemblyName assemblyName) [C:\Src\Project.csproj]
MSBUILD : warning : at System.Runtime.Loader.AssemblyLoadContext.ResolveUsingResolvingEvent(IntPtr gchManagedAssemblyLoadContext, AssemblyName assemblyName) [C:\Src\Project.csproj]
MSBUILD : warning : at GitVersion.GitPreparer.GetDotGitDirectory() [C:\Src\Project.csproj]
MSBUILD : warning : at GitVersion.ExecuteCore.ExecuteGitVersion(String targetUrl, String dynamicRepositoryLocation, Authentication authentication, String targetBranch, Boolean noFetch, String workingDirectory, String commitId, Config overrideConfig, Boolean noCache) in C:\projects\gitversion\src\GitVersionCore\ExecuteCore.cs:line 33 [C:\Src\Project.csproj]
MSBUILD : warning : at GitVersion.ExecuteCore.TryGetVersion(String directory, VersionVariables& versionVariables, Boolean noFetch, Authentication authentication) in C:\projects\gitversion\src\GitVersionCore\ExecuteCore.cs:line 82 [C:\Src\Project.csproj]
MSBUILD : warning : [C:\Src\Project.csproj]
MSBUILD : warning : [C:\Src\Project.csproj]
MSBUILD : warning : WARN [12/13/18 13:00:50:57] Could not determine assembly version: System.IO.FileNotFoundException: Could not load file or assembly 'LibGit2Sharp, Version=0.26.0.0, Culture=neutral, PublicKeyToken=7cbde695407f0333'. The system cannot find the file specified. [C:\Src\Project.csproj]
MSBUILD : warning : File name: 'LibGit2Sharp, Version=0.26.0.0, Culture=neutral, PublicKeyToken=7cbde695407f0333' ---> System.IO.FileNotFoundException: Could not load the specified file. [C:\Src\Project.csproj]
MSBUILD : warning : File name: 'LibGit2Sharp' [C:\Src\Project.csproj]
MSBUILD : warning : at System.Runtime.Loader.AssemblyLoadContext.ResolveUsingEvent(AssemblyName assemblyName) [C:\Src\Project.csproj]
MSBUILD : warning : at System.Runtime.Loader.AssemblyLoadContext.ResolveUsingResolvingEvent(IntPtr gchManagedAssemblyLoadContext, AssemblyName assemblyName) [C:\Src\Project.csproj]
MSBUILD : warning : at GitVersion.GitPreparer.GetDotGitDirectory() [C:\Src\Project.csproj]
MSBUILD : warning : at GitVersion.ExecuteCore.ExecuteGitVersion(String targetUrl, String dynamicRepositoryLocation, Authentication authentication, String targetBranch, Boolean noFetch, String workingDirectory, String commitId, Config overrideConfig, Boolean noCache) in C:\projects\gitversion\src\GitVersionCore\ExecuteCore.cs:line 33 [C:\Src\Project.csproj]
MSBUILD : warning : at GitVersion.ExecuteCore.TryGetVersion(String directory, VersionVariables& versionVariables, Boolean noFetch, Authentication authentication) in C:\projects\gitversion\src\GitVersionCore\ExecuteCore.cs:line 82 [C:\Src\Project.csproj]
MSBUILD : warning : [C:\Src\Project.csproj]
MSBUILD : warning : [C:\Src\Project.csproj]
C:\Program Files\dotnet\sdk\2.1.500\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.GenerateAssemblyInfo.targets(161,5): error MSB4044: The "GetAssemblyVersion" task was not given a value for the required parameter "NuGetVersion". [C:\Src\Project.csproj]
Build FAILED.
Reacted by Will Rogers, Asbjørn Ulsberg and Thomas Freudenberg
Activity
adamshergold commentedon Dec 13, 2018
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).
arturcic commentedon Dec 14, 2018
@kll can you have a look?
kll commentedon Dec 14, 2018
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
build/net461directory contains LibGit2Sharp.dll and the lib folder with the native bits but thebuild/netstandard2.0folder does not. So I assume it's just a packaging issue. I tried to glance through the project and build scripts and couldn't immediately understand how that package is produced to include the files directly rather than as nuget references like in the other projects that produce nuget packages.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.
arturcic commentedon Dec 14, 2018
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
GH-1550 fixed missing dependency
arturcic commentedon Dec 21, 2018
@LordMike can you try the new build 4.0.1-beta1-55?
LordMike commentedon Dec 22, 2018
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
4.0.1-beta1-51, fails as before in-53, and fails like below in-55.asbjornu commentedon Jan 17, 2019
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)?
asbjornu commentedon Jan 21, 2019
@LordMike, @arturcic: What say ye? ☝️
arturcic commentedon Jan 21, 2019
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.
LordMike commentedon Jan 21, 2019
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?
GH-1550 fixed missing dependency
7 remaining items
twsl commentedon Feb 5, 2019
suggested solution with manual install doesn't work on alpine images
Svetomechc commentedon Mar 4, 2019
@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.
bonesoul commentedon Apr 16, 2019
any updates on this?
arturcic commentedon Apr 18, 2019
#1659
bonesoul commentedon May 8, 2019
i'm using 5.0.0-beta2-75 on an ubuntu 14.04 build with libcurl3 installed but still getting
MSBUILD : warning : WARN [05/08/19 12:26:01:82] 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 [/temp/src/hypeengine.twitch/hypeengine.twitch.csproj]arturcic commentedon Jun 27, 2019
@adamshergold , @bonesoul can you try the latest version?
asbjornu commentedon Jun 27, 2019
As LibGit2Sharp was upgraded to version 0.26 in #1713, I think this problem is fixed. Please reopen this issue if the problem persists.
sandorfr commentedon Jul 25, 2019
@asbjornu looks like it's still happening with the vsts extension on Mac agents:
arturcic commentedon Jul 25, 2019
@sandorfr , do you mind giving a try to this one? https://marketplace.visualstudio.com/items?itemName=gittools.gitversion-preview
sandorfr commentedon Jul 25, 2019
@arturcic it was the was I tried for I actually switch to the normal one with 5.0 and it works.