How can we help you today? How can we help you today?
Izzyonstage

Activity overview

Latest activity by Izzyonstage

If there was a way from within the assembly to inject a class that enables me to request an embedded assembly, then I could do something like: private static Assembly Internal_Resolve(object sender, ResolveEventArgs args) {<br>&nbsp; &nbsp; // ... initial resolver setup<br><br>&nbsp; &nbsp; // ... mainDomain is the required Assembly's AppDomain<br>&nbsp; &nbsp; // ... saResolverTypeName is the SA resolver class FullName (passed in to AppDomain Initializer)<br>&nbsp; &nbsp; // ... saResolverPath is SA resolver class location (passed in to AppDomain Initializer);<br>&nbsp; &nbsp; //&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;discovered using typeof(...).Assembly.Location<br>&nbsp; &nbsp; var parentResolver = mainDomain.CreateInstanceFromAndUnwrap(saResolverPath, saResolverTypeName);<br>&nbsp; &nbsp; parentResolver.ResourceAssembly = typeof(CallingAssemblyType).Assembly;<br>&nbsp; &nbsp; var asm = parentResolver.Resolve(sender, args);<br>&nbsp; &nbsp; if(asm != null) {<br>&nbsp; &nbsp; &nbsp; &nbsp; return asm;<br>&nbsp; &nbsp; }<br><br>&nbsp; &nbsp; // ... do other local look-ups<br>} Alternatively, some config to make the assembly write all embedded assemblies to disk (in a temp directory) on startup/request and then load from there. As this would likely enable me to locate it and dynamically load it in my child AppDomain (I believe this is usually the process for unmanaged embedded assembly loading). / comments
If there was a way from within the assembly to inject a class that enables me to request an embedded assembly, then I could do something like:private static Assembly Internal_Resolve(object sender,...
0 votes
I can put something together from the proof-of-concept app I did. I can get it to work, but only if the library dependency is merged into the main app and not embedded. / comments
I can put something together from the proof-of-concept app I did. I can get it to work, but only if the library dependency is merged into the main app and not embedded.
0 votes
If there was a way from within the assembly to inject a class that enables me to request an embedded assembly, then I could do something like: private static Assembly Internal_Resolve(object sender, ResolveEventArgs args) {<br>&nbsp; &nbsp; // ... initial resolver setup<br><br>&nbsp; &nbsp; // ... mainDomain is the required Assembly's AppDomain<br>&nbsp; &nbsp; // ... saResolverTypeName is the SA resolver class FullName (passed in to AppDomain Initializer)<br>&nbsp; &nbsp; // ... saResolverPath is SA resolver class location (passed in to AppDomain Initializer);<br>&nbsp; &nbsp; //&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;discovered using typeof(...).Assembly.Location<br>&nbsp; &nbsp; var parentResolver = mainDomain.CreateInstanceFromAndUnwrap(saResolverPath, saResolverTypeName);<br>&nbsp; &nbsp; parentResolver.ResourceAssembly = typeof(CallingAssemblyType).Assembly;<br>&nbsp; &nbsp; var asm = parentResolver.Resolve(sender, args);<br>&nbsp; &nbsp; if(asm != null) {<br>&nbsp; &nbsp; &nbsp; &nbsp; return asm;<br>&nbsp; &nbsp; }<br><br>&nbsp; &nbsp; // ... do other local look-ups<br>} Alternatively, some config to make the assembly write all embedded assemblies to disk (in a temp directory) on startup/request and then load from there. As this would likely enable me to locate it and dynamically load it in my child AppDomain (I believe this is usually the process for unmanaged embedded assembly loading). / comments
If there was a way from within the assembly to inject a class that enables me to request an embedded assembly, then I could do something like:private static Assembly Internal_Resolve(object sender,...
0 votes