HelpWriter and binary Cmdlets

Use this forum to ask questions after your subscription maintenance expires or before you buy. Need information on licensing or pricing? Questions about a trial version? This is the right place for you. No scripting questions, please.
Forum rules
DO NOT POST SUBSCRIPTION NUMBERS, LICENSE 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.
This topic is 7 years and 11 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
tbednarz
Posts: 17
Last visit: Fri Apr 07, 2017 5:55 am

HelpWriter and binary Cmdlets

Post by tbednarz »

Hi,

I am testing HelpWriter latest version. I am writing binary Cmdlets (those written in C#) using Visual Studio 2015. I am looking for a suitable help editor and found your Help Writer. I downloaded it but I cannot load my own DLL's. Binary Cmdlets are compiled in DLLs, there is no psm module. Is your product able to create MAML based help for my DLL's? If so, how does it work and where can I get further information?
Cheers, Tom
User avatar
juneblender
Posts: 93
Last visit: Thu Mar 30, 2017 8:54 am

Re: HelpWriter and binary Cmdlets

Post by juneblender »

Hi, Tom,

PowerShell HelpWriter works on modules of all types, including binary modules.

To create a help file for your module:

1. In HelpWriter, click File, New, New Help File for Module.
2. Select from the list of modules (in $env:PSModulePath) or, to get to a module in a different path, click Browse, and then navigate to the module.
3. Save your help file in module directory.

Now, you're ready to go.
User avatar
tbednarz
Posts: 17
Last visit: Fri Apr 07, 2017 5:55 am

Re: HelpWriter and binary Cmdlets

Post by tbednarz »

This is what I have already tried but didn't work. Find attached the screenshot of the error message.
Attachments
HelpWriterError.png
HelpWriterError.png (45.44 KiB) Viewed 8709 times
User avatar
juneblender
Posts: 93
Last visit: Thu Mar 30, 2017 8:54 am

Re: HelpWriter and binary Cmdlets

Post by juneblender »

Tom, several of us have been working on this and can't repro it. Can you run Import-Module and Get-Command -Module <ModuleName> w/o error on the cmdlets in your module?

Sorry for the delay, BTW. I was at Global DevOps Summit in Bellevue.
User avatar
tbednarz
Posts: 17
Last visit: Fri Apr 07, 2017 5:55 am

Re: HelpWriter and binary Cmdlets

Post by tbednarz »

Hi,
Sorry, since I did not get an answer for a few days, I did not come back for a while...

To answer your question: Yes of course. I need this all the time when debugging my cmdlet in Visual Studio 2015. Here is the output from PS:
  1. PS C:\WINDOWS\system32> d:
  2. cd D:\Projects\AssetManager\PSModules\BedInventory\BedInventory\bin\Debug
  3. Import-Module .\BedInventory.dll -Verbose
  4. VERBOSE: Loading module from path 'D:\Projects\AssetManager\PSModules\BedInventory\BedInvento
  5. ry\bin\Debug\BedInventory.dll'.
  6. VERBOSE: Importing cmdlet 'Get-InventoryScan'.
  7. VERBOSE: Importing cmdlet 'New-AdComputerToInventory'.
  8. VERBOSE: Importing cmdlet 'New-AdGroupToInventory'.
  9. VERBOSE: Importing cmdlet 'New-AdUserToInventory'.
  10. VERBOSE: Importing cmdlet 'New-ComputerToInventory'.
  11. VERBOSE: Importing cmdlet 'New-InventoryScan'.
  12. VERBOSE: Importing cmdlet 'New-OsDetailsToInventory'.
  13. VERBOSE: Importing cmdlet 'New-WinDiskDriveToInventory'.
  14.  
  15. PS D:\Projects\AssetManager\PSModules\BedInventory\BedInventory\bin\Debug> Get-Command -Module BedInventory
  16.  
  17. CommandType     Name                                               Version    Source        
  18. -----------     ----                                               -------    ------        
  19. Cmdlet          Get-InventoryScan                                  1.0.0.0    BedInventory  
  20. Cmdlet          New-AdComputerToInventory                          1.0.0.0    BedInventory  
  21. Cmdlet          New-AdGroupToInventory                             1.0.0.0    BedInventory  
  22. Cmdlet          New-AdUserToInventory                              1.0.0.0    BedInventory  
  23. Cmdlet          New-ComputerToInventory                            1.0.0.0    BedInventory  
  24. Cmdlet          New-InventoryScan                                  1.0.0.0    BedInventory  
  25. Cmdlet          New-OsDetailsToInventory                           1.0.0.0    BedInventory  
  26. Cmdlet          New-WinDiskDriveToInventory                        1.0.0.0    BedInventory  
  27.  
  28.  
  29.  
  30. PS D:\Projects\AssetManager\PSModules\BedInventory\BedInventory\bin\Debug>
User avatar
juneblender
Posts: 93
Last visit: Thu Mar 30, 2017 8:54 am

Re: HelpWriter and binary Cmdlets

Post by juneblender »

Thanks. I've repro'd the bug now.

Just to confirm, when you start HelpWriter, are you using the Browse button to navigate to the dll file with your cmdlets? Are there multiple dlls in the module?
User avatar
davidc
Posts: 5913
Last visit: Mon Jul 08, 2019 8:55 am
Been upvoted: 2 times

Re: HelpWriter and binary Cmdlets

Post by davidc »

This issue will be resolved in the next service release.

David
David
SAPIEN Technologies, Inc.
User avatar
tbednarz
Posts: 17
Last visit: Fri Apr 07, 2017 5:55 am

Re: HelpWriter and binary Cmdlets

Post by tbednarz »

Currently the module makes up ONE DLL with a growing number of Cmdlets. The DLL itself my reference other DLLs, e.g. I have implemented a DAL (data access layer) using NHibernate and Fluent in a DLL. This DLL is referenced and used INSIDE the implementation of some cmdlets to retrieve or store data from/to databases.

HTH....

Any idea, when the fix is available? I cannot test your software right now.....

Cheers, Tom
User avatar
davidc
Posts: 5913
Last visit: Mon Jul 08, 2019 8:55 am
Been upvoted: 2 times

Re: HelpWriter and binary Cmdlets

Post by davidc »

It should be soon, but I can't provide an exact date. The software must clear our QA department before we can release the service build.

In the meantime, you can get around the issue by:

1. Place the module in a PowerShell discoverable location (PSModulePath) and then select the module from the list.

2. Create a manifest for your binary module and browse to psd1 file.

David
David
SAPIEN Technologies, Inc.
User avatar
tbednarz
Posts: 17
Last visit: Fri Apr 07, 2017 5:55 am

Re: HelpWriter and binary Cmdlets

Post by tbednarz »

Ok, thanks I will try.
This topic is 7 years and 11 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.