The problem comes in here. I want to load the 3rd party dll along with mine, without having to add it as a resource to my main executable. In other words, I want to embed the 3rd party dll in my custom library import them both.
Public Sub New() ‘The constructor for the main form in my exe AddHandler AppDomain.CurrentDomain.AssemblyResolve, AddressOf Domain_AssembilyResolve ' This call is required by the designer. InitializeComponent() ' Add any initialization after the InitializeComponent() call. ... End Sub Private Function Domain_AssembilyResolve(sender As Object, args As System.ResolveEventArgs) As System.Reflection.Assembly If InStr(args.Name, "MyLibrary") Then Return Assembly.Load(My.Resources.MyLibrary) Return Nothing End Function
From novice to tech pro — start learning today.