Skip to content

Instantly share code, notes, and snippets.

@a5ync
Created March 27, 2017 22:29
Show Gist options
  • Save a5ync/376c29a320d9b71dbdf6250ddc343066 to your computer and use it in GitHub Desktop.
Save a5ync/376c29a320d9b71dbdf6250ddc343066 to your computer and use it in GitHub Desktop.
Generate file with all the versions of assemblies included in project
Param(
[Parameter(Mandatory=$true)][string]$sourceDirectory,
[Parameter(Mandatory=$true)][string]$outputFile
)
#$sourceDirectory = "c:\temp\container-builder\"
#$outputFile = "c:\temp\container.txt"
$files= Get-ChildItem $sourceDirectory -Filter *.dll
foreach($file in $files)
{
Add-Content $outputFile "$file.Name $($file.VersionInfo.FileVersion) $($file.VersionInfo.ProductVersion)"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment