How to extract an assembly from the GAC?

后端 未结 15 2053
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-11-29 15:29

There is a package I have to deal with which installs assemblies straight into the GAC (e.g. somewhere deep in %windows%/assembly).

How do I exorcise the actual as

15条回答
  •  旧时难觅i
    2020-11-29 15:40

    From a Powershell script, you can try this. I only had a single version of the assembly in the GAC so this worked just fine.

    cd "c:\Windows\Microsoft.NET\assembly\GAC_MSIL\"
    Get-ChildItem assemblypath -Recurse -Include *.dll |  Copy-Item -Destination "c:\folder to copy to"
    

    where the assembly path can use wildcards.

提交回复
热议问题