[PSS 2018][Bug] Multiple psd1 files in root folder

This forum can be browsed by the general public. Posting is limited to current SAPIEN license holders with active maintenance and does not offer a response time guarantee.
Forum rules
DO NOT POST LICENSE NUMBERS, ACTIVATION KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM.
Only the original author and our tech personnel can reply to a topic that is created in this forum. If you find a topic that relates to an issue you are having, please create a new topic and reference the other in your post.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
Bosparan
Posts: 289
Last visit: Sun Jan 24, 2021 2:18 am

[PSS 2018][Bug] Multiple psd1 files in root folder

Post by Bosparan »

PSS Version: 2018 5.5.155x64
OS Version: Windows 10 x64 1803
WMF Version: 5.1

Impact: Medium

Symptoms:
Having more than one .psd1 file in the module root folder will cause an exception and prevent additional files from showing up / break module synchronization.

Reproducibility:
- Create new module project
- Add second psd1 file to root folder
- Enable project synchronization

Notes:
psd1 files are one recommended way to ship data with a module (for example language files for strings).
They are designed to be imported using Import-PowerShellDataFile
The current behavior hinders interop with open source projects that do deploy data files in the root folder and limits my module design choices.
This should be fixable either by marking the actual module manifest within the project file or implementing a simple ambiguous file resolution by ...
- Preferring a psd1 file sharing the name with the project file
- Then picking a psd1 file that has the same name as the folder
- Finally picking the first file, if neither of the previous options worked out

User avatar
davidc
Posts: 5913
Last visit: Mon Jul 08, 2019 8:55 am

Re: [PSS 2018][Bug] Multiple psd1 files in root folder

Post by davidc »

Hello Fred,

The exception issue will be resolved in the next service release. As for your feature request we need to investigate further.
David
SAPIEN Technologies, Inc.