Object Broswer and custom modules (again)

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 10 years and 2 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
FarmersDairy
Posts: 22
Last visit: Wed Jul 24, 2019 1:00 pm

Object Broswer and custom modules (again)

Post by FarmersDairy »

Almost a year ago I had a problem with my custom modules appearing "Empty" in the object browser. I was able to resolve the issue (and my own stupidity), but I have run in to the same issue again and the same "fix" did not work. The original thread I opened can be found at the following link:

http://www.sapien.com/forums/viewtopic. ... les#p32278


When I posted to that thread, I had Windows 8 Pro running on my work laptop. I recently performed a fresh install of Windows 7 Pro on the same laptop and installed my "work" license of PowerShell Studio (latest version). I placed my custom modules in a custom folder under x:\Program Files (x86)\ and then I made the appropriate changes to the PSModulePath environment variable. When that did not work I followed the instructions found in the blog:

http://www.sapien.com/blog/2012/05/22/p ... repancies/


I have a "home" license as well for PowerShell Studio on my Windows 7 Pro desktop. I did a side by side comparison of the two setups and nothing is jumping out at me. Everything is working correctly on my home system. Any suggestions would be appreciated. I am fully prepared for what is probably an obvious answer. :)
User avatar
davidc
Posts: 5913
Last visit: Mon Jul 08, 2019 8:55 am
Been upvoted: 2 times

Re: Object Broswer and custom modules (again)

Post by davidc »

Did you rebuild the cache after setting the custom folder in the registry? You can use the refresh button in the PowerShell Panel.

What version of PowerShell Studio is installed?

David
David
SAPIEN Technologies, Inc.
User avatar
FarmersDairy
Posts: 22
Last visit: Wed Jul 24, 2019 1:00 pm

Re: Object Broswer and custom modules (again)

Post by FarmersDairy »

Hi David,

Yes, I refreshed the cache (many times). I am using version 3.1.28 on both my home (working) and work (not working) computers. I started having the issue with 3.1.27 and upgraded to 3.1.28 when it was released.
User avatar
davidc
Posts: 5913
Last visit: Mon Jul 08, 2019 8:55 am
Been upvoted: 2 times

Re: Object Broswer and custom modules (again)

Post by davidc »

Can you post the contents of this inf file?

C:\ProgramData\SAPIEN\CachedData 2012\Local Machine\CacheBuilder64.inf

Also please list the files in the Local Machine folder as well.

Thank you,

David
David
SAPIEN Technologies, Inc.
User avatar
FarmersDairy
Posts: 22
Last visit: Wed Jul 24, 2019 1:00 pm

Re: Object Broswer and custom modules (again)

Post by FarmersDairy »

Content of CacheBuilder64.inf

Code: Select all

[CacheBuilder]
Status=Started
[Module]
Current=

Files in folder C:\ProgramData\SAPIEN\CachedData 2012\Local Machine

Image
User avatar
FarmersDairy
Posts: 22
Last visit: Wed Jul 24, 2019 1:00 pm

Re: Object Broswer and custom modules (again)

Post by FarmersDairy »

Just for "gits and shiggles" I copied the "CachedData 2012" folder off of my home PC and replaced it on my work laptop. I can now see the custom modules, even after I try another refresh.

However, if I try to add a new function in one of the custom modules (on either computer) after I refresh I do not see the new function in the Object Browser.

:cry:
User avatar
FarmersDairy
Posts: 22
Last visit: Wed Jul 24, 2019 1:00 pm

Re: Object Broswer and custom modules (again)

Post by FarmersDairy »

I also ran CacheBuilder.exe and CacheBuilder64.exe on both computers. It did not make a difference. I still cannot see the new function in the custom module.
User avatar
davidc
Posts: 5913
Last visit: Mon Jul 08, 2019 8:55 am
Been upvoted: 2 times

Re: Object Broswer and custom modules (again)

Post by davidc »

Did you export the function in the module?
PowerShell Code
Double-click the code block to select all.
Export-ModuleMember FunctionName
David
David
SAPIEN Technologies, Inc.
User avatar
Alexander Riedel
Posts: 8479
Last visit: Thu Mar 28, 2024 9:29 am
Answers: 19
Been upvoted: 37 times

Re: Object Broswer and custom modules (again)

Post by Alexander Riedel »

Did you increase the version number on you module?
The cache is two stage:

Powershell -> ModuleCacheVx\<platform>\modulename<version>.cmdlets
Powershell -> ModuleCacheVx\<platform>\modulename<version>.syntax
Powershell -> ModuleCacheVx\<platform>\modulename<version>.alias

If the file with the same version as the module exists, only the pre-built info is read into the final cache.
Alexander Riedel
SAPIEN Technologies, Inc.
User avatar
FarmersDairy
Posts: 22
Last visit: Wed Jul 24, 2019 1:00 pm

Re: Object Broswer and custom modules (again)

Post by FarmersDairy »

I did not realize I had to change the version number and what affect it had. I actually backed up the entire cache folder, deleted it and then relaunched PowerShell Studio. It automatically rebuilt the cache and everything came up as I would expect it to. :)

Thank you very much for the help guys! I said it before and I will keep saying it, "You guys have the best product support of any application I use." :D
This topic is 10 years and 2 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.