感谢http://www.crifan.com/csharp_integrate_dll_library_into_exe_application/
和 http://www.cnblogs.com/kui2/archive/2012/11/29/embedded-dll.html
对于vs2008 使用.net3.5的情况,可以直接在项目上添加现用项,Main函数最前添加以下函数
//格式1
//!!! for load embedded dll: (2) implement this handler
System.Reflection.Assembly CurrentDomain_AssemblyResolve(object sender, ResolveEventArgs args)
{
string dllName = args.Name.Contains(",") ? args.Name.Substring(0, args.Name.IndexOf(',')) : args.Name.Replace(".dll", "");
dllName = dllName.Replace(".", "_");
if (dllName.EndsWith("_resources")) return null;
System.Resources.ResourceManager rm = new System.Resources.ResourceManager(GetType().Namespace + ".Properties.Resources", System.Reflection.Assembly.Ge