Ask your PowerShell-related questions, including questions on cmdlet development!
Forum rules Do not post any licensing information in this forum.
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 and 6 months 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.
I would like to keep modules clean, meaning putting functions in its own folder within the PS2018 project. When I try to add them into the manifest (FunctionsToExport) section, they disappear after building the module. I use this code in the .psm1 file figuring it would load them. Am I doing something incorrect or in the wrong order?
You can keep all your functions individual files and have PowerShell Studio merge them into a single psm script when the module is Built. This way you don't have to rely on a custom script within the manifest.
Set each ps1 file's Build and Shared properties:
Build = Include
Shared = True
Then PowerShell Studio will handle the rest. If you keep the Auto Export Functions option enabled, you need not touch the manifest.
The added benefit of keeping the manifest static is that it will load faster.
This topic is 5 years and 6 months 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.