What is the recommendation for packaging applications that use System.Management.Automation.dll? I would not like to package it with my app due to licence violation and file size. Joginder
A properly designed application only uses that DLL during development. You need a full version of PowerShell installed on the target for it to work.
Perhaps you need to post in the developers forum to find out how to design and build an app using this kind of DLL. This is a scripting forum and not a forum for developers of compiled code.
Start here: https://msdn.microsoft.com/en-us/library/ff458115(v=vs.85).aspx
Follow all instructions very carefully. Not all of the issues and version issues. Build ALL of the samples until you can make them work.
The chances are that you followed some incorrect blog instructions like including an incorrect reference to the automation reference assembly into you code.