We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bdfbdce commit 913250aCopy full SHA for 913250a
src/NerdBank.GitVersioning/VersionOracle.cs
@@ -278,6 +278,9 @@ private static LibGit2Sharp.Repository OpenGitRepo(string repoRoot)
278
279
private static Version GetAssemblyVersion(Version version, VersionOptions versionOptions)
280
{
281
+ // If there is no repo, "version" could have uninitialized components (-1).
282
+ version = version.EnsureNonNegativeComponents();
283
+
284
var assemblyVersion = versionOptions?.AssemblyVersion?.Version ?? new System.Version(version.Major, version.Minor);
285
assemblyVersion = new System.Version(
286
assemblyVersion.Major,
0 commit comments