Skip to content
This repository was archived by the owner on Apr 8, 2020. It is now read-only.
This repository was archived by the owner on Apr 8, 2020. It is now read-only.

Non-ASP.NET apps - default project path #1100

Closed
@coosmiin

Description

@coosmiin

When trying to use the services in a non-ASP.NET app, I had to set the ProjectPath option to current directory in order to make it work:

var services = new ServiceCollection();
services.AddNodeServices(options => {
	options.ProjectPath = Directory.GetCurrentDirectory();
});
IServiceProvider serviceProvider = services.BuildServiceProvider();
var nodeServices = serviceProvider.GetRequiredService<INodeServices>();
var result = await nodeServices.InvokeAsync<int>("addNumbers", 1, 2);

I would expect the ProjectPath to be set by default to current directory, or, at least to make it clear in the documentation that you need to specify the ProjectPath correctly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions