For some reason, C: \ Program Files \ Reference Assemblies \ Microsoft \ WindowsPowerShell \ v1.0 \ System.Management.Automation.dll was an old version and was never updated.
I did the following: In powershell, I ran this command:
Copy ([OutputType].Assembly.Location) ~/Desktop
Then I moved the dll file that was copied to the desktop to the Reference Assemblies directory shown above. This new file is approximately 3 MB larger than the old one. I also had to convert my project to .NET 4 because this new DLL required it.
source share