Cache Building is removing custom modules

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.
This topic is 2 years and 4 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
User avatar
gatibeneva
Posts: 8
Last visit: Mon Mar 11, 2024 7:20 am

Cache Building is removing custom modules

Post by gatibeneva »

To help you better we need some information from you.

*** Please fill in the fields below. If you leave fields empty or specify 'latest' rather than the actual version your answer will be delayed as we will be forced to ask you for this information. ***

Product, version and build: Powershell Studio 2021 v5.8.196
Operating system: Windows 10 Enterprise
PowerShell version(s): 5.1.18362.1801
32-bit version of software? 64-bit

*** Please add details and screenshots as needed below. ***

DO NOT POST LICENSES, KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM

Since I updated Powershell Studio this morning from v5.8.195 to v5.8.196 I have problem loading custom modules to cache. Said custom modules worked well in the cache prior to the update.

Said custom modules are psm1 script modules with psd1 manifests.

Here are the steps and results leading to my problem:

I go to Cache Editor, my modules appear as not checked.
I remove the modules, then import them back and click Build Cache, then close.
Modules don't appear in the Object Browser nor do my functions color code in my script or give me context help.
If I close Powershell Studio and re-open it, modules are loaded in the Object Browser, and color coding works, but it lasts only a few seconds. After the automatic cache building at stertup ends, my modules are gone, and it doesn't work anymore.

I can redo those steps as often as I want with always the same result.
User avatar
Alexander Riedel
Posts: 8478
Last visit: Tue Mar 26, 2024 8:52 am
Answers: 19
Been upvoted: 37 times

Re: Cache Building is removing custom modules

Post by Alexander Riedel »

There are two issues here I can see.
For one, the cache building process is not started each time PowerShell Studio starts. If it does, it generally means it was not allowed to complete or encountered a severe error while building.
Please verify that if you start PowerShell Studio you see a message in the Tools output panel.
2021-11-26_10-52-48.png
2021-11-26_10-52-48.png (7.87 KiB) Viewed 3882 times
Please let that finish. It should say
>> Completed Cache Information
once it is done.

Close PowerShell Studio and start it back up. Please verify that the cache building process does not start again.

Secondly, in the cache editor, there is no need to delete and reload any modules unless the indicated version is not correct.
2021-11-26_11-06-53.png
2021-11-26_11-06-53.png (66.05 KiB) Viewed 3882 times
Simply check the box of the desired module version and click build cache.
Also make sure that you do have the correct platform and PowerShell version selected in PowerShell Studio as well as in the Cache Editor.
Alexander Riedel
SAPIEN Technologies, Inc.
User avatar
gatibeneva
Posts: 8
Last visit: Mon Mar 11, 2024 7:20 am

Re: Cache Building is removing custom modules

Post by gatibeneva »

Hi, thanks for the reply.

I do confirm that in the Tools Output, I have the Cache Building Process, that it completes successfully, and that it does, in fact, run at every startup of Powershell Studio. I read in my researches that it shouldn't, but that's what it does on my computer.
PS-Cache.png
PS-Cache.png (3.87 KiB) Viewed 3876 times
As for removing the modules, I was trying things to try and understand the problem since it didn't have the expected behavior.
User avatar
Alexander Riedel
Posts: 8478
Last visit: Tue Mar 26, 2024 8:52 am
Answers: 19
Been upvoted: 37 times

Re: Cache Building is removing custom modules

Post by Alexander Riedel »

Please go here: HKEY_CURRENT_USER\SOFTWARE\SAPIEN Technologies, Inc.\PowerShell Studio 2021\CacheBuilder
and let us know what the value of BuildCache is please
Alexander Riedel
SAPIEN Technologies, Inc.
User avatar
gatibeneva
Posts: 8
Last visit: Mon Mar 11, 2024 7:20 am

Re: Cache Building is removing custom modules

Post by gatibeneva »

Hi,

As asked, the content of the BuildCache registry key.
CacheBuilderReg.png
CacheBuilderReg.png (3.24 KiB) Viewed 3871 times
User avatar
Alexander Riedel
Posts: 8478
Last visit: Tue Mar 26, 2024 8:52 am
Answers: 19
Been upvoted: 37 times

Re: Cache Building is removing custom modules

Post by Alexander Riedel »

Hmm, ok, then it should not build on startup. I'll have to confer with the Dev team
Alexander Riedel
SAPIEN Technologies, Inc.
User avatar
gatibeneva
Posts: 8
Last visit: Mon Mar 11, 2024 7:20 am

Re: Cache Building is removing custom modules

Post by gatibeneva »

Hi,

I just rebooted my computer and everything works fine.
User avatar
Alexander Riedel
Posts: 8478
Last visit: Tue Mar 26, 2024 8:52 am
Answers: 19
Been upvoted: 37 times

Re: Cache Building is removing custom modules

Post by Alexander Riedel »

Ok, cool, thank you for letting us know.
Alexander Riedel
SAPIEN Technologies, Inc.
This topic is 2 years and 4 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.