Using Powershell from Package Manager Console I can open and close file:
$DTE.ExecuteCommand(“File.OpenFile”, $file)
$DTE.ExecuteCommand(“File.Close”)
But when I try to save it:
$DTE.ExecuteCommand(“File.Save”, $file)
or
$DTE.ExecuteCommand(“File.Save”)
I get error:
PM> $DTE.ExecuteCommand(“File.Save”) Command "File.Save" is not valid. At line:1 char:1 + $DTE.ExecuteCommand(“File.Save”) + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : OperationStopped: (:) [], COMException + FullyQualifiedErrorId : System.Runtime.InteropServices.COMException
How I can save it?
Actually I want to save it in other encoding: