Page 2 of 2

Re: How to make PowerShell Studio import custom modules?

Posted: Wed Jun 14, 2017 10:16 am
by amloessb
No, there's no manifest. I haven't needed the features that using a manifest provides, and not using one has never caused any issues.

Microsoft's own documentation states that, "for simple modules that contain only a single .psm1 or binary assembly, a module manifest is optional."
https://msdn.microsoft.com/en-us/librar ... s.85).aspx

Re: How to make PowerShell Studio import custom modules?

Posted: Wed Jun 14, 2017 11:07 am
by Alexander Riedel
My apologies, I wasn't trying to say there should be one. I was just making sure I have everything. It could have been you only sent the .psm1, so I wanted to make sure.

Re: How to make PowerShell Studio import custom modules?

Posted: Wed Jun 14, 2017 12:45 pm
by amloessb
No worries. Thanks for clearing that up.

Re: How to make PowerShell Studio import custom modules?

Posted: Wed Jun 14, 2017 3:16 pm
by Alexander Riedel
Replace the attached file in your installation, fire up the cacheeditor and re-import your module.
Please let me know if that helps.

Re: How to make PowerShell Studio import custom modules?

Posted: Wed Jun 14, 2017 4:08 pm
by amloessb
That works, thanks!
https://i.imgur.com/vYadjR3.png
Also, I just want to confirm my understanding based on what you said earlier: If I modify a module without bumping its version number (which I guess is what would happen if I don't have a manifest), PowerShell Studio won't see the changes (new functions, etc.) unless I remove and re-add it through the cache editor?

Re: How to make PowerShell Studio import custom modules?

Posted: Thu Jun 15, 2017 10:05 am
by Alexander Riedel
Well, the versioning exists for that reason. If you modify the version as you update a module, you just need to rebuild the cache. It should pick it up automatically.
If it sees V0.0 and it already has that, it won't update it. So yes, you need to specifically import it again.
It is not really required to have a manifest for a module, but my personal opinion is that it should be :D
Having a valid version resource is a best practice for all types of modules across all types of programming languages.

Re: How to make PowerShell Studio import custom modules?

Posted: Thu Jun 15, 2017 12:45 pm
by amloessb
I understand, I just wanted to confirm the application's behavior. Thanks very much for your help.