Activity overview
Latest activity by Izzyonstage
Not sure what was going on there. Posted comment and it wouldn't let me edit it. Now there are 5 copies of it. I have an example PoC project I could send over. It has a working saproj which does merging of the main "library" dependency, and a broken version which is embedding that same dependency. / comments
Not sure what was going on there. Posted comment and it wouldn't let me edit it. Now there are 5 copies of it.I have an example PoC project I could send over. It has a working saproj which does mer...
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> // ... initial resolver setup<br><br> // ... mainDomain is the required Assembly's AppDomain<br> // ... saResolverTypeName is the SA resolver class FullName (passed in to AppDomain Initializer)<br> // ... saResolverPath is SA resolver class location (passed in to AppDomain Initializer);<br> // discovered using typeof(...).Assembly.Location<br> var parentResolver = mainDomain.CreateInstanceFromAndUnwrap(saResolverPath, saResolverTypeName);<br> parentResolver.ResourceAssembly = typeof(CallingAssemblyType).Assembly;<br> var asm = parentResolver.Resolve(sender, args);<br> if(asm != null) {<br> return asm;<br> }<br><br> // ... 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,...
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.
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> // ... initial resolver setup<br><br> // ... mainDomain is the required Assembly's AppDomain<br> // ... saResolverTypeName is the SA resolver class FullName (passed in to AppDomain Initializer)<br> // ... saResolverPath is SA resolver class location (passed in to AppDomain Initializer);<br> // discovered using typeof(...).Assembly.Location<br> var parentResolver = mainDomain.CreateInstanceFromAndUnwrap(saResolverPath, saResolverTypeName);<br> parentResolver.ResourceAssembly = typeof(CallingAssemblyType).Assembly;<br> var asm = parentResolver.Resolve(sender, args);<br> if(asm != null) {<br> return asm;<br> }<br><br> // ... 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,...