- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我必须处理一个包,它将程序集直接安装到 GAC 中(例如,位于 %windows%/assembly 深处的某个位置)。
如何将实际程序集(DLL)从 GAC 转移到普通文件系统中?
谢谢。
最佳答案
我使用了 this article 的建议从 GAC 获取大会。
Get DLL Out of The GAC
DLLs once deployed in GAC (normally located at c:\windows\assembly) can’t be viewed or used as a normal DLL file. They can’t be directly referenced from VS project. Developers usually keep a copy of the original DLL file and refer to it in the project at development (design) time, which uses the assembly from GAC during run-time of the project.
During execution (run-time) if the assembly is found to be signed and deployed in GAC the CLR automatically picks up the assembly from the GAC instead of the DLL referenced during design time in VS. In case the developer has deleted the original DLL or don't have it for some reason, there is a way to get the DLL file from GAC. Follow the following steps to copy DLL from GAC
Run regsvr32 /u C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\shfusion.dll
- shfusion.dll is an explorer extension DLL that gives a distinct look to the GAC folder. Unregistering this file will remove the assembly cache viewer and the GAC folder will be then visible as any normal folder in explorer.
Open “%windir%\assembly\GAC_MSIL”.
Browse to your DLL folder into the deep to find your DLL.
Copy the DLL somewhere on your hard disk and refer it from there in your project
Run "regsvr32 %windir%\Microsoft.NET\Framework\<.NET version directory> \shfusion.dll" to re-register the shfusion.dll file and regain the original distinct view of the GAC.
关于.net - 如何从 GAC 中提取程序集?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/714907/
我是一名优秀的程序员,十分优秀!