I am trying to list some files in a tree to work on them
$files_AppConfig = Get-ChildItem -Path .\App.config -Recurse
$files_WatcherConfig = Get-ChildItem -Path .\WatcherServiceConfig.xml -Recurse
$files_StrControles = Get-ChildItem -Path .\Web.config -Recurse
$files = $files_AppConfig + $files_WatcherConfig + $files_StrControles
ForEach($file in $files)
{
#Do some stuff
}
But when called by visual studio in prebuild event, i have Method invocation failed because [System.Management.Automation.PSObject] doesn't contain a method named 'op_Addition'