Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to find type [Markdown.MAML.Model.MAML.MamlCommand] #470

Closed
midacts opened this issue Jul 16, 2019 · 5 comments
Closed

Unable to find type [Markdown.MAML.Model.MAML.MamlCommand] #470

midacts opened this issue Jul 16, 2019 · 5 comments

Comments

@midacts
Copy link

midacts commented Jul 16, 2019

Steps to reproduce

# Run the container
docker run -it --name platyps debian:latest

# Install prereqs and PowerShell 6
apt-get update && apt-get install -y liblttng-ust0 libicu57 liburcu4 liblttng-ust-ctl2

wget https://github.com/PowerShell/PowerShell/releases/download/v6.2.1/powershell_6.2.1-1.debian.9_amd64.deb --no-check-certificate

# Copy over PlatyPS and any PS module
docker copy C:\path\to\platyps platyps:/root/
docker copy C:\path\to\your\module platyps:/root/

# Run powershell
pwsh

# Import your modules
Import-Module /root/platyps/platyps.psm1
Import-Module /root/YourModule

# Make your output director
mkdir func

# Run PlatyPS
$MDHelp = @{
	'Module'		= "YourModule"
	'OutputFolder'		= "/func"
	'AlphabeticParamsOrder'	= $True
	'Verbose'		= $True
}
New-MarkdownHelp @MDHelp

# Error occurs
Unable to find type [Markdown.MAML.Model.MAML.MamlCommand].
At /root/PlatyPS/0.9.0/platyPS.psm1:162 char:17

Expected behavior

Convert the help into markdown

Actual behavior

Errors out:
Unable to find type [Markdown.MAML.Model.MAML.MamlCommand].

Environment data

PowerShell 6.2.1 on Debian Stretch
v0.14.0

@vors
Copy link
Collaborator

vors commented Jul 16, 2019

You need to build c-sharp part of the project if you want to run it from source. Or you can simply get it from psgallery with Import-Module -Scope CurrentUser platyPS.

@vors vors closed this as completed Jul 16, 2019
@midacts
Copy link
Author

midacts commented Jul 17, 2019

Does that work for Linux running PowerShell Core?

I have PlatyPS v0.14.0. I see the Markdown.MAML.dll file in the root of the module, but maybe Linux cannot use those out of the box?

@vors
Copy link
Collaborator

vors commented Jul 30, 2019

Yes, it works on linux. Here are CI builds https://travis-ci.org/PowerShell/platyPS/builds

@vors
Copy link
Collaborator

vors commented Jul 30, 2019

# Copy over PlatyPS and any PS module
docker copy C:\path\to\platyps platyps:/root/
docker copy C:\path\to\your\module platyps:/root/

You repro doesn't specify where you got the C:\path\to\platyps from.
You can do one of 2 things:

  1. Build it yourself from sources, see linked instruction
  2. Get it from gallery

@midacts
Copy link
Author

midacts commented Jul 31, 2019

Thanks for your help.

I was able to get it to work by:

  • Copying the Markdown.MAML.dll and YamlDotNet.dll files into the platyps/src/platyps directory
  • Importing the platyps module
  • Running New-MarkdownHelp

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants