Skip to content

Instantly share code, notes, and snippets.

@garfbradaz
Created November 5, 2017 09:16
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 garfbradaz/54645abe0e6005fb43943ac9ba99c9ad to your computer and use it in GitHub Desktop.
Save garfbradaz/54645abe0e6005fb43943ac9ba99c9ad to your computer and use it in GitHub Desktop.
Simple Script to update app.config keys during the Team Services (TFS) Build.
New-Item -ItemType directory -Path $(Build.SourcesDirectory)\EmailTests
$xml = [xml](Get-Content app.config)
$xml.configuration.'system.net'.mailSettings.smtp.specifiedPickupDirectory | foreach { $_.pickupDirectoryLocation = "$(Build.SourcesDirectory)\EmailTests\" }
$xml.Save((Resolve-Path "app.config"))
Write-Host $(Build.SourcesDirectory)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment