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.
User avatar
tbednarz
Posts: 17
Joined: Tue Jan 12, 2016 3:09 am

HelpWriter and binary Cmdlets

Post by tbednarz » Wed Apr 06, 2016 5:01 am

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
Joined: Thu Jul 24, 2014 3:26 pm

Re: HelpWriter and binary Cmdlets

Post by juneblender » Wed Apr 06, 2016 6:29 am

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
Joined: Tue Jan 12, 2016 3:09 am

Re: HelpWriter and binary Cmdlets

Post by tbednarz » Wed Apr 06, 2016 12:31 pm

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 6444 times

User avatar
juneblender
Posts: 93
Joined: Thu Jul 24, 2014 3:26 pm

Re: HelpWriter and binary Cmdlets

Post by juneblender » Fri Apr 08, 2016 12:05 pm

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
Joined: Tue Jan 12, 2016 3:09 am

Re: HelpWriter and binary Cmdlets

Post by tbednarz » Wed Apr 13, 2016 9:02 am

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:

Code: Select all

PS C:\WINDOWS\system32> d:
cd D:\Projects\AssetManager\PSModules\BedInventory\BedInventory\bin\Debug
Import-Module .\BedInventory.dll -Verbose
VERBOSE: Loading module from path 'D:\Projects\AssetManager\PSModules\BedInventory\BedInvento
ry\bin\Debug\BedInventory.dll'.
VERBOSE: Importing cmdlet 'Get-InventoryScan'.
VERBOSE: Importing cmdlet 'New-AdComputerToInventory'.
VERBOSE: Importing cmdlet 'New-AdGroupToInventory'.
VERBOSE: Importing cmdlet 'New-AdUserToInventory'.
VERBOSE: Importing cmdlet 'New-ComputerToInventory'.
VERBOSE: Importing cmdlet 'New-InventoryScan'.
VERBOSE: Importing cmdlet 'New-OsDetailsToInventory'.
VERBOSE: Importing cmdlet 'New-WinDiskDriveToInventory'.

PS D:\Projects\AssetManager\PSModules\BedInventory\BedInventory\bin\Debug> Get-Command -Module BedInventory

CommandType Name Version Source
----------- ---- ------- ------
Cmdlet Get-InventoryScan 1.0.0.0 BedInventory
Cmdlet New-AdComputerToInventory 1.0.0.0 BedInventory
Cmdlet New-AdGroupToInventory 1.0.0.0 BedInventory
Cmdlet New-AdUserToInventory 1.0.0.0 BedInventory
Cmdlet New-ComputerToInventory 1.0.0.0 BedInventory
Cmdlet New-InventoryScan 1.0.0.0 BedInventory
Cmdlet New-OsDetailsToInventory 1.0.0.0 BedInventory
Cmdlet New-WinDiskDriveToInventory 1.0.0.0 BedInventory



PS D:\Projects\AssetManager\PSModules\BedInventory\BedInventory\bin\Debug>

User avatar
juneblender
Posts: 93
Joined: Thu Jul 24, 2014 3:26 pm

Re: HelpWriter and binary Cmdlets

Post by juneblender » Wed Apr 13, 2016 9:29 am

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
Joined: Thu Aug 18, 2011 4:56 am

Re: HelpWriter and binary Cmdlets

Post by davidc » Wed Apr 13, 2016 2:11 pm

This issue will be resolved in the next service release.

David
David
SAPIEN Technologies, Inc.

User avatar
tbednarz
Posts: 17
Joined: Tue Jan 12, 2016 3:09 am

Re: HelpWriter and binary Cmdlets

Post by tbednarz » Wed Apr 13, 2016 11:16 pm

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
Joined: Thu Aug 18, 2011 4:56 am

Re: HelpWriter and binary Cmdlets

Post by davidc » Thu Apr 14, 2016 7:59 am

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
Joined: Tue Jan 12, 2016 3:09 am

Re: HelpWriter and binary Cmdlets

Post by tbednarz » Thu Apr 14, 2016 2:25 pm

Ok, thanks I will try.