vb.netvisual-studiovb.net-2010

Extract DLL and Import DLL (VB.NET)


I want to make portable app that uses the NAudio dll. I put the DLL files into Resources and tried this:

My.Computer.FileSystem.WriteAllBytes("\NAudio.dll", My.Resources.NAudio, True)

When I run the program (as an exe, not in the debugger), I get this error:

Undhandled Exception window

I tried DLLimport, no luck. How can I fix this?


Solution

  • I solved by using ILMerge

    Worked perfectly.

    Also don't need to extract :)