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
Description
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
Labels
No labels