Skip to content

Method invocation failed because [System.IO.Path] does not contain a method named 'GetRelativePath'. #30

@glopesdev

Description

@glopesdev

The following command can fail when running the Export-Images.ps1 script from local PowerShell (e.g. from a build.ps1 script):

$svgPathRelative = [IO.Path]::GetRelativePath($documentationRoot, $svgPath)

Method invocation failed because [System.IO.Path] does not contain a method named 'GetRelativePath'.

It seems by default PowerShell may not be using .NET Core for whatever reason. The CI scripts can run everything correctly, but it is often useful and faster to be able to debug locally, so would be great to provide some configuration or FAQ explaining how to workaround this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingdocumentationImprovements or additions to documentation

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions