Skip to content

Commit

Permalink
Support VersionOverride with DotNetClassicTool.TryCreateFrom.
Browse files Browse the repository at this point in the history
  • Loading branch information
ejball committed May 14, 2024
1 parent 35e50c4 commit e970799
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Faithlife.Build/DotNetClassicTool.cs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public static DotNetClassicTool CreateFrom(string projectPath, string packageNam
var packageVersion = ((IEnumerable) XDocument.Load(projectPath).XPathEvaluate("//PackageReference"))
.OfType<XElement>()
.Where(x => string.Equals(x.Attribute("Include")?.Value, packageName, StringComparison.OrdinalIgnoreCase))
.Select(x => x.Attribute("Version")?.Value)
.Select(x => x.Attribute("Version")?.Value ?? x.Attribute("VersionOverride")?.Value)
.FirstOrDefault();
if (packageVersion is null)
return null;
Expand Down

0 comments on commit e970799

Please sign in to comment.