In this line
foreach (Type type in Assembly.GetExecutingAssembly().GetTypes())
you're referring to the executing assembly (your dll). Change it to the actual assembly that you want to inspect.
[Edit]
Have a look at
GetCallingAssembly[
^].
Looks like you could use it in your dll's entry point to get the assembly of the immediate calling method. The link states some quirks, though.
And, since I have no idea of your application's control flow, it could as well return some assembly belonging to the .NET framework.
[/Edit]