Created
May 4, 2015 17:53
-
-
Save lifebeyondfife/f8bc64a9f7d000eb385f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
AppDomain.CurrentDomain.AssemblyResolve += (sender, args) => | |
{ | |
String resourceName = Assembly.GetExecutingAssembly().GetName().Name + "." + new AssemblyName(args.Name).Name + ".dll"; | |
using (var stream = Assembly.GetExecutingAssembly().GetManifestResourceStream(resourceName)) | |
{ | |
Byte[] assemblyData = new Byte[stream.Length]; | |
stream.Read(assemblyData, 0, assemblyData.Length); | |
return Assembly.Load(assemblyData); | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment