File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
src/NerdBank.GitVersioning Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -279,11 +279,13 @@ private static LibGit2Sharp.Repository OpenGitRepo(string repoRoot)
279279 private static Version GetAssemblyVersion ( Version version , VersionOptions versionOptions )
280280 {
281281 var assemblyVersion = versionOptions ? . AssemblyVersion ? . Version ?? new System . Version ( version . Major , version . Minor ) ;
282+ var precision = versionOptions ? . AssemblyVersion ? . Precision ?? VersionOptions . VersionPrecision . Minor ;
283+
282284 assemblyVersion = new System . Version (
283285 assemblyVersion . Major ,
284- versionOptions ? . AssemblyVersion ? . Precision >= VersionOptions . VersionPrecision . Minor ? version . Minor : 0 ,
285- versionOptions ? . AssemblyVersion ? . Precision >= VersionOptions . VersionPrecision . Build ? version . Build : 0 ,
286- versionOptions ? . AssemblyVersion ? . Precision >= VersionOptions . VersionPrecision . Revision ? version . Revision : 0 ) ;
286+ precision >= VersionOptions . VersionPrecision . Minor ? assemblyVersion . Minor : 0 ,
287+ precision >= VersionOptions . VersionPrecision . Build ? version . Build : 0 ,
288+ precision >= VersionOptions . VersionPrecision . Revision ? version . Revision : 0 ) ;
287289 return assemblyVersion . EnsureNonNegativeComponents ( 4 ) ;
288290 }
289291 }
You can’t perform that action at this time.
0 commit comments