Powershell dll loading

前端 未结 3 1875
有刺的猬
有刺的猬 2020-12-17 18:15

I have a Powershell script that calls a method in a C# library. The library dll is loaded as:

[Reflection.Assembly]::LoadFrom(\"$automationHome\\dll\\abc.dll         


        
3条回答
  •  天涯浪人
    2020-12-17 18:45

    A couple of ideas:

    Does the reference to xyz.dll from abc.dll (add reference) have the specific version property set to true (default setting) and you are using a later version of xyz.dll?

    For some assemblies the only way to get them to work is o load them into the GAC. You may want to try loading xyz into the GAC.

提交回复
热议问题