[英]Using gacutil to install a .dll
我正在嘗試安裝.dll引用以在我的代碼中使用它,但我在使用gacutil時遇到問題。 有人能幫助我這個格式嗎?
我曾嘗試使用http://msdn.microsoft.com/en-us/library/ex0ss12c.aspx但我仍然必須做錯事......
我嘗試安裝的.dll是Office.dll
這是我嘗試過的:
gacutil /i Office.dll "C:\File\path\Office.dll"
它出現了一個錯誤:
Unknown option: C:\File\path\Office.dll
有人會有任何想法來幫助我嗎?
你不需要第二個參數
只需使用:
gacutil /i "C:\\File\\path\\Office.dll"
您可以使用Publish
類輕松地將dll添加到GAC。 添加對System.EnterpriseServices
引用
System.EnterpriseServices.Internal.Publish publish = new System.EnterpriseServices.Internal.Publish();
publish.GacInstall("dll path");
嘗試gacutil /i "C:\\File\\path\\Office.dll"
。 另請注意,必須強烈命名程序集才能在GAC中正確安裝。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.