Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在开发一个从PSSnapIn.
PSSnapIn
如果我手动将snapin.dll-help.xml文件复制到 GAC get-help,我的命令会像预期的那样工作。
snapin.dll-help.xml
get-help
那么,是否有可能让 InstallUtil 在安装时复制 xml 文件和 dll?
如果您可以使用 PS V2,我建议您创建一个 PowerShell V2 模块。这消除了使用 installutil 的需要。如果需要,您可以使用 Xcopy 进行部署。您只需要创建一个模块清单。您还可以将帮助文件包含在您创建的模块的目录中,它会起作用。您仍然使用 PSSnapin 基类,但是打包它的方式有所不同。这是从 V1 到 V2 的主要改进之一。在 PowerShell 中,运行命令以获取有关模块的一些信息。
PS> help about_module