cake-contrib / Cake_Git

Cake AddIn that extends Cake with Git features using LibGit2 and LibGit2Sharp
https://cakebuild.net/extensions/cake-git
Other
39 stars 64 forks source link

AccessViolationException when calling tag.Annotation.Message #174

Open achikhv opened 1 year ago

achikhv commented 1 year ago

Hello!

I get AccessViolationException when trying to access tag's annotation properties. It seems, that #129 allows to load targets, but the issue occures when trying to access target's lazy-initialized properties.

Here is sample that will cause AVE when executed

#addin Cake.Git&version=3.0.0

var tags = GitTags("..", true);

foreach (var t in tags)
{
    if (t.IsAnnotated)
    {
        Information(t.Annotation.Message);
    }
}

Is there any way I can read annotation's properties?