File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed
src/PostSharp.Engineering.BuildTools/Build/Files Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -107,7 +107,7 @@ public static bool TryWrite(
107107 thisAutoUpdatedVersionsPropertyGroupElement = new XElement ( "PropertyGroup" ) ;
108108 thisAutoUpdatedVersionsDocument . Root ! . Add ( thisAutoUpdatedVersionsPropertyGroupElement ) ;
109109 }
110-
110+
111111 // Update dependency versions.
112112 var errors = 0 ;
113113 string ? inheritedMainVersion = null ;
@@ -151,6 +151,12 @@ public static bool TryWrite(
151151 continue ;
152152 }
153153
154+ // Getting the inherited main version.
155+ if ( context . Product . MainVersionDependency == dependency )
156+ {
157+ inheritedMainVersion = releasedMainVersionPropertyValue ;
158+ }
159+
154160 // Load dependency version from public version.
155161 var versionElementName = $ "{ dependency . NameWithoutDot } Version";
156162 var versionElement = thisAutoUpdatedVersionsPropertyGroupElement . Element ( versionElementName ) ;
@@ -175,12 +181,6 @@ public static bool TryWrite(
175181 hasDependenciesChanges = true ;
176182
177183 context . Console . WriteMessage ( $ "Setting version dependency '{ dependency } ' from '{ oldVersionValue } ' to '{ dependencyReleasedVersion } '." ) ;
178-
179- // Getting the inherited main version.
180- if ( context . Product . MainVersionDependency == dependency )
181- {
182- inheritedMainVersion = releasedMainVersionPropertyValue ;
183- }
184184 }
185185
186186 // Stop here if errors.
You can’t perform that action at this time.
0 commit comments