So I have view this link: How to reference System.Management.Automation in a .NET Framework 4.7.2?
"you must use System.Management.Automation v5.1.x." this could works for me
But I want to find out if I can use System.Management.Automation without install any reference using Nuget. (like from the native machine, add reference is fine.)
I try to find through assembly but nothing. I have verified that there exist System.Management.Automation.dll
in all these three location:
C:\Windows\assembly\GAC_MSIL\System.Management.Automation\1.0.0.0__31bf3856ad364e35
C:\Program Files\Reference Assemblies\Microsoft\WindowsPowerShell\v1.0
C:\Program Files (x86)\Reference Assemblies\Microsoft\WindowsPowerShell\3.0
Also, since I can fine the dll file, so I followed this link (https://learn.microsoft.com/en-us/dotnet/framework/app-domains/install-assembly-into-gac) to install an assembly into the global assembly cache. But still not work.
Only System.Management
and System.Management.Instrumentation
in (Assemblies) Add Reference table.
Please help,
Many thanks!