Skip to content

Instantly share code, notes, and snippets.

@garyjohnson
Created March 7, 2013 15:44
Show Gist options
  • Select an option

  • Save garyjohnson/5108949 to your computer and use it in GitHub Desktop.

Select an option

Save garyjohnson/5108949 to your computer and use it in GitHub Desktop.
Powershell script for comparing CS to VB file
Function Compare-VB($csFilePath) {
$tempFile = [System.IO.Path]::GetTempPath() + [guid]::NewGuid() + ".vb"
& 'C:\Program Files\InstantVB\InstantVB.exe' $csFilePath $tempFile
WaitForFile($tempFile)
& 'C:\Program Files (x86)\Beyond Compare 3\BCompare.exe' $csFilePath.Replace(".cs",".vb") $tempFile
}
Function WaitForFile($path) {
while(!(Test-Path $path)) {
Start-Sleep -s 1
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment