Page 1 of 1

[PSS 2016] Do Not Edit File on Build Module

Posted: Tue Nov 22, 2016 10:04 am
by mpalmer
I don't know if this bugs just me, but I absolutely dislike the fact that PSS edits my PSM1 file when I use the Build Module button in a Module Project. The button is extremely useful but the fact that it edits my files makes me not want to use it.

This is a commercial product that many people use to build custom scripts and applications and I don't think it should be editing files adding in comments.

At the very least I think this should be an option, it could even be opt-out, but I don't think it should be a feature that cannot be turned off.

My apologies if I missed an option that allows this feature to be turned off. If such an option does exist I'd love to know where it is.

Thanks for a great product.

Re: [PSS 2016] Do Not Edit File on Build Module

Posted: Tue Nov 22, 2016 10:21 am
by davidc
It sounds like you have your project in the same folder the module project exports to.

Keep the PowerShell Studio project folder in your My Documents\SAPIEN\PowerShell Studio\Projects folder.
And then when the project builds, it will automatically copy the final psm1 file (and any content files) to the My Documents\WindowsPowerShell\Modules folder. It does this, because the final psm1 will contain the exported GUI functions and possibly merge any necessary ps1 scripts (depending on your project file build settings).

Re: [PSS 2016] Do Not Edit File on Build Module

Posted: Tue Nov 22, 2016 10:26 am
by mpalmer
I don't have the project in the same folder the module exports to. These are also strictly script modules there's no GUI files associated with them.

What I'm referring to is I can look at my PSM1 file in my project directory and it is exactly my code. When I use the Build Module button and then look at the code in the PSM1 in my module directory PSS has added a comment block to the very top of the file and indented another level everything after it .

Re: [PSS 2016] Do Not Edit File on Build Module

Posted: Tue Nov 22, 2016 12:51 pm
by davidc
Thank you for the clarification. The content shouldn't be tabbed. We will look into this and get back to you.

Re: [PSS 2016] Do Not Edit File on Build Module

Posted: Wed Nov 23, 2016 9:06 am
by mpalmer
Just to be clear I don't care so much about the content getting tabbed in. What I really care about is the comment block that gets prepended into the psm1 file.