我是一个有用的助手,可以翻译文本。
我正在尝试将以下c#控制台应用程序转换为powershell脚本。到目前为止,已经转换的PowerShell脚本卡在了ExtractCabFiles行。我在转换后的代码中错过了什么吗?两者都附在此处,我知道这可能会有所帮助。
这是控制台代码
MethodInfo extractCab = typeof (SPSolutionLanguagePack).GetMethod("ExtractCabFiles",
BindingFlags.Default |
BindingFlags.Static |
BindingFlags.NonPublic);
//extract the wsp files to the temp folder
extractCab.Invoke(null, newobject[] {Path.GetFullPath(filesFolder), Path.GetFullPath(solutionName)});
这里是转换后的代码
MethodInfo $extractCab = typeof (SPSolutionLanguagePack).GetMethod("ExtractCabFiles",
BindingFlags.Default |
BindingFlags.Static |
BindingFlags.NonPublic);
#extract the wsp files to the temp folder
$extractCab.Invoke(null, newobject[] {Path.GetFullPath($filesFolder), Path.GetFullPath($solutionName)});
SPSolutionLanguagePack
зҡ„private static ExtractCabFiles(string folder, string solution)
ж–№жі•еҗ—пјҹ - Jodrell