-
I'm writing a custom PowerShell module and I need to distribute a DLL with the code. What is the "right" directory to put the DLL in using the SimpleModule scaffold? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
I'd create a subfolder called So avoid Enum, Classes, Public, Private. |
Beta Was this translation helpful? Give feedback.
-
@cohdjn I'm curious how you build the module once you imported the built module it into the session. Are you always debugging/testing the module in a separate process so you can built the module again so it can replace the .dll without throwing that there is a locked file? |
Beta Was this translation helpful? Give feedback.
I'd create a subfolder called
lib/
.If you add the dll in git, add
source/lib
Basically, I'd avoid using a "reserved name" of stuff that is merged together by ModuleBuilder: https://github.com/PoshCode/ModuleBuilder/blob/main/Source/Public/Build-Module.ps1#L99
So avoid Enum, Classes, Public, Private.
Should also avoid help, docs, en.... but that's more obvious anyway.