I want to use the latest contents of a XAML file stored in TFS Source Control and embed it in a string variable, which is to be submitted as a query to MS SQL Server.
I have been using TFS Power Tools cmdlets in PowerShell (such as Get-TfsChildItem and Select-TfsItem) to successfully get handles on TFS files, changesets and shelvesets. But I cannot identify any methods or properties on these objects that would allow me to directly get the contents of a file into a variable.
I want to do something like this:
$tfsFileName = "$/MyBranch/MyFile.xaml"
$tfsServerName = "http://myTFSServer:8080/tfs"
$tfsServer = Get-TfsServer $tfsServerName
$xamlFile = Get-TfsChildItem -Item $tfsFileName -Server $tfsServer
$xamlContent = (Get-Content $xamlFile)
Is this possible, or do I always have to perform a Get Latest using tf.exe, and then get the contents of the local file?