diff --git a/build.ps1 b/build.ps1 index ae9aba447c..9c97275103 100644 --- a/build.ps1 +++ b/build.ps1 @@ -1,4 +1,3 @@ -$Version = "2021.1.0" $IsPreview = $false $BuildPath = "$PSScriptRoot\Build" @@ -21,6 +20,9 @@ if(-not(Test-Path -Path "$BuildPath\NETworkManager\NETworkManager.exe")) Write-Error "Could not find dotnet release build. Is .NET SDK 5.0 or later installed?" -ErrorAction Stop } +# Get NETworkManager File Version +$Version = [System.Diagnostics.FileVersionInfo]::GetVersionInfo("$BuildPath\NETworkManager\NETworkManager.exe").FileVersion + # Cleanup WebView2Loader.dll (https://github.com/MicrosoftEdge/WebView2Feedback/issues/461) Remove-Item "$BuildPath\NETworkManager\arm64" -Recurse Remove-Item "$BuildPath\NETworkManager\x64" -Recurse @@ -54,4 +56,4 @@ else { Get-ChildItem -Path $BuildPath | Where-Object {$_.Name.EndsWith(".zip") -or $_.Name.EndsWith(".exe")} | Get-FileHash -Write-Host "Build finished! All files are here: $BuildPath" -ForegroundColor Green \ No newline at end of file +Write-Host "Build finished! All files are here: $BuildPath" -ForegroundColor Green