當調用exe文件時,需將文件後綴改爲dll,否則無法引用。
Visual Studio 可以引用exe文件。
Import-module “G:/Microsoft/VSProjects/ClassLibrary1/bin/Debug/ClassLibrary1.dll" $class1 = new-object 'ClassLibrary1.Class1' $class1 | get-member $class1.Test()