This ought to do the trick:
stream = GetResourceStream(System.Reflection.Assembly.GetCallingAssembly(), aFileName)
If stream Is Nothing Then
stream = GetResourceStream(System.Reflection.Assembly.GetExecutingAssembly(), aFileName)
If stream Is Nothing Then
stream = GetResourceStream(System.Reflection.Assembly.GetEntryAssembly(), aFileName)
End If
End If
Probably you only need the GetExecutingAssembly.
Kind regards,
Jhn
|