方法一:命令行拷貝。
開始--運行--cmd--"cd C:\WINDOWS\assembly".一般自己開發的dll都在GAC_MSIL這個文件夾下面,按照我如下的截圖就可以拷貝出你所需要的DLL文件。
方法二:使用WinRAR工具
打開WinRAR工具,把 C:\WINDOWS\assembly地址輸入到地址欄中,如下圖。在WinRAR中已經詳細列出GAC里面的文件結構。
進入到GAC_MSIL文件夾下面,如圖:
這里面你直接“Ctrl+C”復制(右鍵沒有復制這個選項),粘帖到你電腦里,OK!
方法3:
當機器上安裝一些程序后,Assembly中的DLL會變得越來越豐富。
拿個常見問題來說明。
安裝ReportViewer后其中會出現以下DLL。
Microsoft.ReportViewer.ProcessingObjectModel.dll
Microsoft.ReportViewer.WinForms.dll
Microsoft.ReportViewer.Common.dll
下面兩個,在VS安裝目錄可以搜到,而Microsoft.ReportViewer.ProcessingObjectModel.dll無論如何也是搜不着,全硬盤搜索也搜不到。
那么,就開始執行以下命令:
Subst b: %windir%\assembly
執行完后,會發現硬盤分區多了個B盤,打開后看到了所有assembly下的DLL,於是在這里就搜到了Microsoft.ReportViewer.ProcessingObjectModel.dll,將其復制出來。
然后,這個虛擬的B分區不再需要,於是執行以下命令將其刪除:
Subst b: /d
只要是在這台機器上安裝了的DLL或在assembly中可以看到的都是可以用上面的辦法拿出來的。
在開發環境的電腦上可生成報表,但是一到客戶端就提示An error occurred during local report processing錯誤。
猜想是缺dll,補充上
Microsoft.ReportViewer.Common.dll
Microsoft.ReportViewer.WinForms.dll
結果問題依舊,難道還缺?
google后得知還缺一個
Microsoft.ReportViewer.ProcessingObjectModel.dll
這個可不好找,在C:\Windows\assembly中能看到,但不能直接復制。
於是在命令提示符下
C:\Users\Thinkpad>cd C:\Windows\assembly
C:\Windows\assembly>cd GAC_MSIL\Microsoft.ReportViewer.ProcessingObjectModel\10.
0.0.0__b03f5f7f11d50a3a
C:\Windows\assembly\GAC_MSIL\Microsoft.ReportViewer.ProcessingObjectModel\10.0.0
.0__b03f5f7f11d50a3a>copy Microsoft.ReportViewer.ProcessingObjectModel.dll d:\Mi
crosoft.ReportViewer.ProcessingObjectModel.dll