REFERENCE MATERIAL RELATED TO SYSTEM.MANAGEMENT.AUTOMATION.DLL INTEGRATION INTO .NET FRAMEWORK PROJECTS:
--------------------------------------------------------------------------------------------------------
Conditions exist where, if you attempt to add the system.management.automation.dll from what is currently available in nuget (6.0.4 and greater), all of those packages are compiled System.Runtime version 4.2.1.0.  If you only have System.Runtime 4.1.2.0, which is possible even if you have all of the lastest updates, then you won't be able to use any of the available packages in nuget from Microsoft.  This readme uses a novel approach to resolving that dilemna to allow you to use a system.management.automation.dll likely to be compatible with the System.Runtime present on your system.  As long as PowerShell has been installed (optional on Windows 7 and earlier) then a potential fix is available to you.

SPECIAL NOTE: For PowerShell Integration for Windows 10 Professional - Visual Studio Professional 2017 version 15.9.22 and .Net Framework version 4.8.03761 (and all Framework versions installed up to 4.8).

PROBLEM: Attempt to use nuget package manager to download and install ANY version of System.Management.Automation (less than version 7.0.0 which is for CORE).
         Only prior versions worked with .Net Framework.  The last versions that were available included: 6.0.4 - 6.2.4.
         Those were ALL built with System.Runtime version 4.2.1.0 (that version - or earlier versions - is NOT available on nuget by Microsoft).

PROBLEM IDENTIFICATION with .Net Framework Application:
         1. Install a version of System.Management.Automation (less than version 7) from nuget such as 6.0.4.
         2. Add reference to that DLL.
         3. Add using System.Management.Automation into a code page.
         4. Create simple method in that code page which uses -> var runspace = RunspaceFactory.CreateRunspace(); runspace.Open(); var powershell = PowerShell.Create(); powershell.Runspace = runspace; var results = powershell.Invoke();
         5. Intellisense should underline "powershell" and generate an error approximating -> system.management.automation version=x.x.x.x uses system.runtime version 4.2.1.0 which is a higher version than than referenced assembly system.runtime version 4.1.2.0.

PROBLEM FIX:
         1. To find PowerShell version on your computer, open PowerShell command-line and enter: Get-Host | Select-Object Version.
         2. Go to where PowerShell is installed on your computer, such as -> C:\Program Files (x86)\Reference Assemblies\Microsoft\WindowsPowerShell\3.0
         3. Find System.Management.Automation DLL in that folder.
         4. Copy to the Visual Studio project folder (such as this one) and add it as a new item.  Add a reference to that DLL file you placed in the project.
         5. In this case, System.Management.Automation.DLL used with this project originated from Powershell version 5.1.17763.1007.
