You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
GetBuildVersion fails with NullReferenceException when the version key is missing in version.json
Expected result:
An informative error message.
Actual result:
The "Nerdbank.GitVersioning.Tasks.GetBuildVersion" task failed unexpectedly.
System.NullReferenceException: Object reference not set to an instance of an object.
at Nerdbank.GitVersioning.VersionOracle..ctor(String projectDirectory, Repository repo, Commit head, ICloudBuild cloudBuild, Nullable`1 overrideBuildNumberOffset, String projectPathRelativeToGitRepoRoot) in c:\Code\Nerdbank.GitVersioning\src\NerdBank.GitVersioning\VersionOracle.cs:line 101
at Nerdbank.GitVersioning.VersionOracle.Create(String projectDirectory, String gitRepoDirectory, ICloudBuild cloudBuild, Nullable`1 overrideBuildNumberOffset, String projectPathRelativeToGitRepoRoot) in c:\Code\Nerdbank.GitVersioning\src\NerdBank.GitVersioning\VersionOracle.cs:line 40
at Nerdbank.GitVersioning.Tasks.GetBuildVersion.ExecuteInner()
at MSBuildExtensionTask.ContextAwareTask.Execute()
at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext()
(I forgot to commit the version.json in the subdirectory that specified version.)
The text was updated successfully, but these errors were encountered:
GetBuildVersion fails with NullReferenceException when the
version
key is missing inversion.json
Expected result:
An informative error message.
Actual result:
(I forgot to commit the
version.json
in the subdirectory that specifiedversion
.)The text was updated successfully, but these errors were encountered: