Estoy siguiendo estos pasos:
El problema es que lo he hecho todo, pero me da error el "applicationEvents.vb"
Mi ApplicationEvents estaba vacío al abrirlo, no se si ese puede ser el error, quizás me falta algo, solo tengo esto :
CitarAdd the desired assembly (stdlib.dll) to the project's resources.
Go to the Resources tab of the Project Properties and choose Add Resource > Add Existing File...
Switch to the Application tab and click on the View Application Events button.
Add this code to the ApplicationEvents.vb code that opens.Código (vbnet) [Seleccionar]Private Sub AppStart(ByVal sender As Object,
ByVal e As Microsoft.VisualBasic.ApplicationServices.StartupEventArgs) Handles Me.Startup
AddHandler AppDomain.CurrentDomain.AssemblyResolve, AddressOf ResolveAssemblies
End Sub
Private Function ResolveAssemblies(sender As Object, e As System.ResolveEventArgs) As Reflection.Assembly
Dim desiredAssembly = New Reflection.AssemblyName(e.Name)
If desiredAssembly.Name = "the name of your assembly" Then
Return Reflection.Assembly.Load(My.Resources.STDLIB) 'replace with your assembly's resource name
Else
Return Nothing
End If
End Function
Now compile your project and you'll have the dependent assembly incorporated into the output as a single file.
El problema es que lo he hecho todo, pero me da error el "applicationEvents.vb"
Código [Seleccionar]
Error 1 Statement is not valid in a namespace. C:\Users\Administrador\Desktop\WindowsApplication19 - copia - copia\ApplicationEvents.vb 1 1 WindowsApplication19
Mi ApplicationEvents estaba vacío al abrirlo, no se si ese puede ser el error, quizás me falta algo, solo tengo esto :
Código (vbnet) [Seleccionar]
Private Sub AppStart(ByVal sender As Object,
ByVal e As Microsoft.VisualBasic.ApplicationServices.StartupEventArgs) Handles Me.Startup
AddHandler AppDomain.CurrentDomain.AssemblyResolve, AddressOf ResolveAssemblies
End Sub
Private Function ResolveAssemblies(sender As Object, e As System.ResolveEventArgs) As Reflection.Assembly
Dim desiredAssembly = New Reflection.AssemblyName(e.Name)
If desiredAssembly.Name = "Ookii.Dialogs.dll" Then
Return Reflection.Assembly.Load(My.Resources.Ookii.Dialogs) 'replace with your assembly's resource name
Else
Return Nothing
End If
End Function