Closed manuel-sperrle closed 1 year ago
I do not understand this request on several levels :)
Can you please clarify all this and give more details. Versions, OS, etc.
There is no FunctionsToExport etc. mentioned -> what i assume prevents autoload in the following configuration:
If you want to reproduce / to clarify - all versions are "latest" at the time of this post: Powershell docker container (mcr.microsoft.com/powershell) Mdbc Module is installed in AllUsers context using the Dockerfile (Install-Module Mdbc -Scope AllUsers) -> that config doesnt want to autoload the module - forced to explicitely either #require or to import the module
Just tested under Windows -> autoloading works - agreed
Me and some other guys discussed that topic earlier that day and maybe im not able to rephrase the issue properly in case you may want to join in: https://discord.gg/powershell
I do not want to join discord. Try to rephrase this :) I know that it is "recommended" to list the provided commands in the manifest but I've never really seen / understood why. Are you asking to list the module commands in the manifest?
NB Autoloading may not work right away. The initial explicit loading (or maybe even a few) is needed. Autoloading is some PS hidden not well documented magic.
thx the reply again y basically just listing the "Exports": Commands/Cmdlets/Functions inside the psm1 should do - to my believes
there is also a little handy function to do this: https://learn.microsoft.com/de-de/powershell/module/microsoft.powershell.core/new-modulemanifest
All right, I do not mind to list cmdlets in the manifest, say, "by the book". Fingers crossed, maybe this helps, cannot promise or expect anything though.
thank you in advance allready - keeping all fingers crossed Thx a lot the invested work. (in general)
v6.6.5 Please let me know if this helped (but I close anyway).
y totally fine now :) - thanks a lot hint: you may want to remove the import-module in your example aswell - its not needed anymore
I believe the explicit Import-Module
is still needed for the very first use (like trying the example).
Thank you for reporting, I've learned something new and useful to know.
Thank you for listening and instant fixing :)
Try out in a silent minute - the explicit Import should not be needed anymore
Hi nightroman,
could you please add a manifest / psm1 in order to have the module autoloading if needed?
Would be great.
Thx in advance Regards, Manu