diff --git a/.config/dotnet-tools.json b/.config/dotnet-tools.json index 5d8c576..5f7646a 100644 --- a/.config/dotnet-tools.json +++ b/.config/dotnet-tools.json @@ -13,6 +13,12 @@ "commands": [ "nuke" ] + }, + "gitversion.tool": { + "version": "5.10.3", + "commands": [ + "dotnet-gitversion" + ] } } } \ No newline at end of file diff --git a/build/Build.cs b/build/Build.cs index c691524..aa34697 100644 --- a/build/Build.cs +++ b/build/Build.cs @@ -25,7 +25,7 @@ class Build : NukeBuild [Solution] readonly Solution? Solution; [GitRepository] readonly GitRepository? GitRepository; - [GitVersion(NoFetch = true, Framework = "net6.0")] readonly GitVersion? GitVersion; + [GitVersion(Framework = "net6.0", NoFetch = true)] readonly GitVersion? GitVersion; GitLab? CI => GitLab.Instance; @@ -90,7 +90,7 @@ class Build : NukeBuild .SetProject(csproj) .SetConfiguration(Configuration) .SetOutputDirectory(ArtifactsDirectory) - .SetVersion(GitVersion?.FullSemVer ?? SemanticVersion.Parse(CI?.CommitTag?.TrimStart('v') ?? "0.0.1").ToNormalizedString()) + .SetVersion(GitVersion?.NuGetVersionV2 ?? SemanticVersion.Parse(CI?.CommitTag?.TrimStart('v') ?? "0.0.1").ToNormalizedString()) .EnableIncludeSource() .EnableIncludeSymbols() .EnableNoRestore()