Adding assemblies to Powershell studio project

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 6 years and 4 weeks 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
whiggs2
Posts: 38
Last visit: Fri May 13, 2022 11:03 am

Adding assemblies to Powershell studio project

Post by whiggs2 »

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: SAPIEN PowerShell Studio 2018
Version 5.5.149
32 or 64 bit version of product: 64-bit
Operating system: Microsoft Windows 10 Enterprise
10.0.16299 N/A Build 16299
32 or 64 bit OS: 64-bit

*** Please add details and screenshots as needed below. ***
How exactly does the "assemblies" feature in powershell studio work? I have an assembly that I used to be able to import successfully and use within a powershell project I am working on (dll can be found in zip file at https://gallery.technet.microsoft.com/s ... t-a832f7bd), and it still works when I run it from my machine. However, when I run the packaged executable from a test machine I create, the action which is supposed to occur with the dll does not occur. Why is this? I thought the dll was embedded in the executable and would be run from any machine?


DO NOT POST SUBSCRIPTIONS, KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM
User avatar
Alexander Riedel
Posts: 8478
Last visit: Tue Mar 26, 2024 8:52 am
Answers: 19
Been upvoted: 37 times

Re: Adding assemblies to Powershell studio project

Post by Alexander Riedel »

An assembly is basically a fancy .NET name for a DLL :D. DLLs contain executable code, just like an EXE file, just that it is supposed to be shared code.
So there is no embedding DLLs within an EXE, it goes counter the idea of sharing code in a Dynamic Link Library.
You can create an installer (MSI) which then installs your packaged script along with that DLL and any other required auxiliary files.
That's the prescribed way of distributing anything that requires multiple files.
Alexander Riedel
SAPIEN Technologies, Inc.
This topic is 6 years and 4 weeks 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.