Error when using PictureBox

This forum can be browsed by the general public. Posting is limited to current SAPIEN license holders with active maintenance and does not offer a response time guarantee.
Forum rules
DO NOT POST LICENSE NUMBERS, ACTIVATION KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM.
Only the original author and our tech personnel can reply to a topic that is created in this forum. If you find a topic that relates to an issue you are having, please create a new topic and reference the other in your post.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
This topic is 5 years old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
User avatar
SwinIT
Posts: 5
Last visit: Tue Aug 01, 2023 8:32 am

Error when using PictureBox

Post by SwinIT »

To help you better we need some information from you.

*** Please fill in the fields below. If you leave fields empty or specify 'latest' rather than the actual version your answer will be delayed as we will be forced to ask you for this information. ***

Product, version and build: PowerShell Studio 2018 5.5.154
32 or 64 bit version of product: 64bit
Operating system: Windows Server 2008 R2
32 or 64 bit OS: 64bit

*** Please add details and screenshots as needed below. ***

Hello, I am trying to add a company logo to one of our scripts. I added a picturebox and uploaded the image. When I try to run the script I get the following error:

"Cannot resolve dependency to assembly 'System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' because it has not been preloaded. When using the ReflectionOnly APIs, dependent assemblies must be pre-loaded or loaded on demand through the ReflectionOnlyAssemblyResolve event."

I only get this error when I have the picturebox, if I delete the picturebox the script runs with no issues. Any help would be appreciated. Thank you.







DO NOT POST SUBSCRIPTIONS, KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM
User avatar
davidc
Posts: 5913
Last visit: Mon Jul 08, 2019 8:55 am
Been upvoted: 2 times

Re: Error when using PictureBox

Post by davidc »

What version of PowerShell are you running? The System assembly should be loaded by default in a PowerShell session.
David
SAPIEN Technologies, Inc.
User avatar
SwinIT
Posts: 5
Last visit: Tue Aug 01, 2023 8:32 am

Re: Error when using PictureBox

Post by SwinIT »

I am running PowerShell V4.
User avatar
brittneyr
Site Admin
Posts: 1654
Last visit: Wed Mar 27, 2024 1:54 pm
Answers: 39
Been upvoted: 30 times

Re: Error when using PictureBox

Post by brittneyr »

In PowerShell Studio, go to Options->Editor->Assemblies.
Assemblies.png
Assemblies.png (176.49 KiB) Viewed 2421 times
There you can add assemblies to load.
Brittney
SAPIEN Technologies, Inc.
User avatar
SwinIT
Posts: 5
Last visit: Tue Aug 01, 2023 8:32 am

Re: Error when using PictureBox

Post by SwinIT »

Perfect!! thank you so much! I added the assembly and now it works.
This topic is 5 years old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.