-
Notifications
You must be signed in to change notification settings - Fork 649
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
GitVersion JsonReader null object crash on Azure Pipelines agent in dotnet build (5.0.0-beta2 and 5.0.0-beta3-29) #1698
Comments
This appears to be a parallelism issue. When I switched to msbuild and limited the parallelism, this problem went away:
Obviously not ideal since now my solution takes a lot longer to build, but it works |
Duplicate of #1381. I believe the root cause of these are the same |
I think this one should be merged into #1381, but I can't seem to figure out how... |
The problem I found was that, each csproj was being built in parallel (this used to be opt in behaviour in previous versions of msbuild and legacy .net projects, but now it appears opt out behaviour) and this means the gitversion msbuild tasks also run in parallel and they end up using libgit2sharp concurrently and that hits the exception. If libgit2sharp doesn't support concurrent usage then the solution to this would seem to be that gitversion task would have to wrap libgit2sharp usage in it's own locking mechanism - a mechanism that works across process boundaries.. |
So the opt-out option is only in dotnet restore, not build or publish which I'm using. I've had to resort to msbuild -maxCpuCount:1 |
Ok thanks. |
I'm getting the below crash when running GitVersionTask from "dotnet publish". I only notice this on my Azure Pipelines agent when running the DotNetCoreCLI task. It works locally.
I've got package references in a few different csprojs which target netstandard2.0, net465, and netcoreapp2.2. Example:
This may not be related, but I also get a warning:
WARN [05/31/19 20:11:01:23] Could not determine assembly version: LibGit2Sharp.LockedFileException: the index is locked; this might be due to a concurrent or crashed process
just before I see this error. Here is my pipeline task config:This seems to appear in builds deterministically, but not consistently. Some configurations of csprojs with the projectreference enabled, but not others. Some fail in the second build when the first build succeeded.
The text was updated successfully, but these errors were encountered: