作者suny999 ()
看板C_Sharp
標題Re: [問題] 請問如何把dll嵌入exe
時間Tue Feb 15 08:17:15 2011
※ 引述《megaman1206 (megaman)》之銘言:
: ILMerge
: http://0rz.tw/8b2hV
: 作者網站
: http://research.microsoft.com/~mbarnett/
之前也遇到一樣的問題 需要embed DLL檔
我只是要將embed zip文件解壓
於是內嵌Ionic.Zip.dll
執行階段將Ionic.Zip.dll讀到Stream Bytes[]
再用Assembly.Load(stream).GetType(...)
.InVokeMethod("Read",...).InVokeMethod("ExtractAll",...)
如果早看到這篇好文 就不用反射 寫的這麼難看 ...
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 115.43.126.69
※ 編輯: suny999 來自: 115.43.126.69 (02/15 21:45)