Closed DEberhardt closed 2 years ago
I'm encountering the same issue. The New-MarkdownHelp is consistently failing on this:
[CmdletBinding()] param ( [Parameter(Mandatory = $true)] [Microsoft.ActiveDirectory.Management.ADOrganizationalUnit]$Ou )
When running in an interactive PowerShell window, this can be suppressed using -ErrorAction SilentlyContinue, but when run from Jenkins it is a full stop error regardless.
checked the v2-preview1 in the runner - same result.
I will continue to update my docs manually for now, with v0.14.x
I would like to help you guys get to the bottom of this issue, but I don't know where to start looking in the code, sorry.
HA! Turns out, I am suffering an ISO/OSI 8 error^^ If you don't install and import the Module providing the Type, New-MarkdownHelp will complain about the type not being present.
Going through the only differences between my environment and the runner environment, I could find that I had removed the pre-requisite (Module AzureAd in my case) because of a clash with the AzureAdPreview Module (Assembly with this name already loaded error).
Leaving this one open for @martin9700 - maybe this helps you resolve your issue as well. :smile:
Yah, that works for me too. Unfortunately mine is for a module creation pipeline and we often use implied module loads (lazy, I know). So now we're going to have to require people to load any dependencies. It's just a change people might not love, but I can live with that.
One question I do have: Why is New-MarkdownHelp needing to load these types in the first place? Is it completely necessary when just creating markdown from the help?
This is expected behavior.
Prerequisites
Steps to reproduce
When running the MarkDownhelp in a Github action, I get a different behaviours despite running the command from the same version.
"It worked on my machine", but it doesn't work on the build runner :/
only one similar issue "Unable to find type" was found, but resolution there was not suitable for me.
Am I missing some "using..." statement which would allow me to use the OutputType, should I not use it or is this something else?
Cheers, David
Expected behavior
Actual behavior
Error details
Environment data
Didn't run $PSversionTable in the runner, but it is running PWSH:
just to be safe, I also tried on PWSH on my machine, works OK
I also tried 0.14.1 and 0.14.2, but it didn't make a difference... in fact, I think I just found a different issue with 0.14.2...