是否可以将 C# 类库与 exe 应用程序(作为单个文件)而不是 .dll + .exe 链接?
可以使用 Ilmerge: 教程
您还可以在编译后使用ILMerge将托管 DLL 与您的 exe 结合起来。
You can embed the DLL file as a resource within the EXE, then handle the AppDomain.AssemblyResolve
event and load it from the byte[]
.
Make sure to add the handler before the JITter encounters the DLL.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.