I just had the same issue ('The project does not support adding package references through the add package command.').
I was able to solve it using this command in the (NuGet) 'Package Manager Console' instead:
Install-Package System.Management.Automation