程序中引用了第三方控件Dll文件,发布的时候不想把这些Dll文件放在程序根目录下面,我想把这些Dll文件嵌入在资源文件中,运行时释放到内存中并动态引用Dll!该怎么来实现呢?
            Assembly assembly = Assembly.GetExecutingAssembly();
            Stream stream = assembly.GetManifestResourceStream("MyDll.dll");
            byte[] fileBytes = new byte[stream.Length];
            stream.Read(fileBytes, 0, fileBytes.Length);
            Assembly.Load(fileBytes);