文章摘要
文章讨论了使用Reflection.Assembly加载部分类集的方法,具体涉及LoadWithPartialName方法在加载System.EnterpriseServices类集及其相关DLL中的应用。文章介绍了如何通过创建和初始化System.EnterpriseServices.Internal.Publish对象,并使用GacInstall方法将DLL加载到系统中。这种技术在扩展系统功能和实现部分类集加载需求中具有重要意义。
[Reflection.Assembly]::LoadWithPartialName(“System.EnterpriseServices”) > $null
[System.EnterpriseServices.Internal.Publish] $publish=New-Object System.EnterpriseServices.Internal.Publish
$publish.GacInstall(“<DLL的完整路径>”)
[Reflection.Assembly]::LoadWithPartialName(“System.EnterpriseServices”) > $null
[System.EnterpriseServices.Internal.Publish] $publish=New-Object System.EnterpriseServices.Internal.Publish
$publish.GacInstall(“<DLL的完整路径>”)
© 版权声明
文章版权归作者所有,未经允许请勿转载。