Skip to content

Conversation

svr333
Copy link

@svr333 svr333 commented Nov 20, 2021

Description

In larger applications with multiple assemblies, entry assembly may be null.
This will cause issues when trying to display an AcrylicWindow for example, which uses the AppIcon.
(Even when AcrylicWindowStyle is set to NoIcon / None)

The reason I used Assembly#GetExecutingAssembly over Assembly#GetCallingAssembly can be found here.
It does not matter in my case but it may in someone elses.

The fix is also written in a way that will not affect other programs, only if the EntryAssembly returns null, it will get the ExecutingAssembly.

Related Issue

Resolves #87

Extra

I also removed the using statements that were not in use.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Null reference exception when using AcrylicWindow from Excel VSTO Addin

1 participant