Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

.NET 

CodeDom how to add the Ionic.Zip dll ?

Hey Guys,
I want to make usage of the Ionic.Zip dll in my Stub. I have added the dll as reference and as resource to my project, also I have referred to it in the compiling sub of the builder :

Code
objCompilerParameters.ReferencedAssemblies.Add("Ionic.Zip.dll")
This code stands at the beginning in the Stub.txt, after the assembly declaration :
Code
Namespace My

   Partial Friend Class MyApplication

       Private WithEvents Domaene As AppDomain = AppDomain.CurrentDomain
       Private Function Domaene_AssemblyResolve(ByVal sender As Object, ByVal args As System.ResolveEventArgs) As System.Reflection.Assembly Handles Domaene.AssemblyResolve
           If args.Name.Contains("Ionic.Zip") Then
               Return System.Reflection.Assembly.Load(Resources.Ionic_Zip)
           Else
               Return Nothing
           End If
       End Function

   End Class

End Namespace

When I try to build the file I get the error : "Ionic_Zip" is no member of "My.Resources". Any help is appreciated, thanks.
Because it isn't part of the resources... It may be a reference of the builder but that isn't how codedom works... You can't think of them as the same program. If you only need the builder to add the reference then why would 'MyApplication' need to deal with any reflection? The only thing the stub would need to do at that point is include the proper namespaces required for the classes and methods it's using.

This is a silly approach anyways, if the resource Ionic_Zip is the Ionic assembly being loaded from your stub code, that should be dealt with and added as a REFERENCE by the builder anyways. Not carried as a resource and then loaded dynamically at runtime reducing the performance for no apparent reason from the output executable.

If you don't want to carry the dll around then build it into the executable.
Getting Started: C/C++
[C/C++/.NET/x86 ASM - Automation Programmer]
I use Imerge...works fine unless target is net 2.0
You arent adding the resource.
https://stackoverflow.com/questions/4078...ile-vb-net
Lotta blood to let, peace to make, give a fuk about a check


Possibly Related Threads...
Thread / Author Replies Views Last Post
[C] by SecurifierJan 17, 2020 07:20 AM 12 416 Jan 17, 2020 07:20 AM
Last Post: SIM-3602340
[.NET] by NovaHowlDec 29, 2017 05:08 PM 5 247 Dec 29, 2017 05:08 PM
Last Post: NovaHowl
[C#] by ๖ۣۜAnubisOct 28, 2016 12:55 PM 7 2,462 Oct 28, 2016 12:55 PM
Last Post: Zippy™