Hello everyone i dont know if this question is asked before but i need to update couple of values in a xml file using powershell i have the following code it works local but on tfs it doesn't work i get the following error System.Management.Automation.MethodInvocationException: Exception calling "ReadAllText" with "1" argument(s): "Value cannot be null.
And i have the following code
$EmployeeData= "C:\files\Employees.xml"
$oldEmployeeID= "23"
$NewEmployeeID= "25"
$content = [System.IO.File]::ReadAllText($EmployeeData).Replace($oldEmployeeID, $NewEmployeeID)
[System.IO.File]::WriteAllText($EmployeeData, $content)
localy it works but on tfs its crashes does anybody know why with the following error code
System.Management.Automation.MethodInvocationException: Exception calling "ReadAllText" with "1" argument(s): "Value cannot be null.