简体   繁体   中英

Does .NET have something like JAR in Java

I wonder whether there is in .NET something similar in Java JAR. I am building a plugin system that loads the plugins. It happens that a single plugins are referencing lot of external DLLs. All this files are not compact. I wonder if they can be packed or linked together into one DLL or one large package to achieve safer distribution.

You could try using ILMERGE Microsoft application.
See this link

The closest analogue to a JAR is the assembly. An assembly contains a manifest, describing the contents. There is nothing built in that will package several DLLs into one.

However, for combining assemblies, you can look at ILMERGE .

ILMerge is a utility that can be used to merge multiple .NET assemblies into a single assembly.

For building a plugin architecture, I suggest looking at MEF .

In the roll your own scenario there is no reason why you couldn't have the code that detects dlls to also unzip them from any archive format

MEF is the plug in system for .NET that is popular but has the best support in 4.0 and higher.

MonoAdd ins is a plugin system that was created by the Mono folk, but works on windows and gets some good reviews.

MAF is a plugin system that is devilishly complicated to work with and is highly optimized for interop with MS-Office.

NET compiles into dll or exe. You can use ILMerge to merge several dlls/exes into one.

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM