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 f0f2f8c commit 1573e15Copy full SHA for 1573e15
eng/scripts/automation/GenerateAndBuildLib.ps1
@@ -892,8 +892,15 @@ function GeneratePackage()
892
}
893
894
# get the sdk version
895
+ $version = ""
896
$projectFile = Join-Path $srcPath "$packageName.csproj"
- $version=([xml](Get-Content $projectFile)).Project.PropertyGroup.Version
897
+ $csproj = new-object xml
898
+ $csproj.PreserveWhitespace = $true
899
+ $csproj.Load($projectFile)
900
+ $versionNode = ($csproj | Select-Xml "Project/PropertyGroup/Version").Node
901
+ if ($versionNode) {
902
+ $version = $versionNode.InnerText
903
+ }
904
$packageDetails = @{
905
version=$version;
906
packageName="$packageName";
0 commit comments