Skip to content

Instantly share code, notes, and snippets.

@valerysntx
Created October 21, 2018 19:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save valerysntx/37e5d6de1d0e2a32fec4bf9ac84f5003 to your computer and use it in GitHub Desktop.
Save valerysntx/37e5d6de1d0e2a32fec4bf9ac84f5003 to your computer and use it in GitHub Desktop.
Measure-TargetFramework powershell msbuild inline task helper
Get-ChildItem -Path C:\path\to\project\root -Filter *.csproj -Recurse |
Select-Xml -Namespace @{msb="http://schemas.microsoft.com/developer/msbuild/2003"} -XPath "//msb:TargetFrameworkVersion" |
Select-Object -Property @{Name="TargetFrameworkVersion"; Expression={$_.Node.InnerXml}} |
Select-Object -ExpandProperty TargetFrameworkVersion |
Group-Object
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment