Skip to content

[install.ps1] Fix: Add System.Drawing assembly#702

Merged
Ana06 merged 1 commit into
mandiant:mainfrom
Ana06:drawing
Jun 30, 2025
Merged

[install.ps1] Fix: Add System.Drawing assembly#702
Ana06 merged 1 commit into
mandiant:mainfrom
Ana06:drawing

Conversation

@Ana06

@Ana06 Ana06 commented Jun 30, 2025

Copy link
Copy Markdown
Member

The install.ps1 script previously failed in certain environments because it couldn't find the System.Drawing.ColorTranslator type, as the System.Drawing assembly was not loaded. This commit resolves the issue by adding Add-Type -Assembly System.Drawing, ensuring the necessary assembly is available.

Closes #701

As the script worked for me before, @dougsec, @coryfancypants can you please confirm this fixes the issue?

The `install.ps1` script previously failed in **certain environments**
because it couldn't find the `System.Drawing.ColorTranslator` type, as
the `System.Drawing` assembly was not loaded. This commit resolves the
issue by adding `Add-Type -Assembly System.Drawing`, ensuring the
necessary assembly is available.

Closes mandiant#701
@Ana06
Ana06 requested a review from sara-rn June 30, 2025 10:19
@Ana06 Ana06 self-assigned this Jun 30, 2025
@Ana06 Ana06 added the 🐛 bug Something isn't working label Jun 30, 2025
@dougsec

dougsec commented Jun 30, 2025

Copy link
Copy Markdown

@Ana06 confirmed, the updated file works for me from the previous snapshot I had where the install was failing. Thanks for the fast resolution!

@Ana06

Ana06 commented Jun 30, 2025

Copy link
Copy Markdown
Member Author

Thanks for confirming it @dougsec! 🚀

@Ana06
Ana06 merged commit cad4f0c into mandiant:main Jun 30, 2025
2 checks passed
@coryfancypants

Copy link
Copy Markdown

Hi @Ana06
I reverted back to my snapshot, and pulled the updated file, I do see the inclusion of the fix, however, it did not work for me.
I believe it is because the $errorColor and $successColor variables are attempting to use the System.Drawing Assembly, before the assembly is added.

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

Labels

🐛 bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Latest changes in UI break the installer (unable to find System.Drawing)

3 participants