Is there a native or custom MSBuild task available that returns the current OS version? Is there a binary that I could call via an Exec task? Or is there some 开发者_如何学Pythonother option?
Edit: Peter Lang suggested the following link: http://www.paraesthesia.com/archive/2009/07/06/getting-the-windows-os-version-in-msbuild.aspx
You can try with a registry key lookup as described in this post.
You could Exec this PowerShell line:
Get-WMIObject Win32_OperatingSystem | select Version
精彩评论