agracio/edge-js

Namespace not found in NuGet package, .net 8.0

Closed this issue · 10 comments

Hi,

I'm trying call NodeJS code from c#, have installed the NuGet package.

But this line:

using EdgeJs;

Just gives:

error CS0246: The type or namespace name 'EdgeJs' could not be found (are you missing a using directive or an assembly reference?)

Any ideas?

Thank you!

Nuget package only supports .NET Framework Script Node.js from CLR. Take a look at this issue #92 for a possible workaround, this solution is not using Edge.js.

Ah, thank you! Is it impossible to get it working with .net 8.0, or just that the work hasn't been done?

It is not possible to run Edge.js nuget package using .NET Core and there are no plans to implement it since it would require a very substantial amount of work.
If solution offered in #92 works for you then you would have to rely on that.

@neilgd - were you able to run your app using #92?

Hi, actually tried a different approach, but all working now. Thank you for the reply!

What is a different approach, please share so I can add this to suggested solutions.

Ah, it was a completely different approach - I eventually found a library in C# that did what I needed, so I didn't need to call NodeJS after all.

Ah, it was a completely different approach - I eventually found a library in C# that did what I needed, so I didn't need to call NodeJS after all.

Would you be so kind as to share the name of the library you found please?

I think he means that he found a library that does the functions that he needed node.js package to do. Not a library that calls .NET from node.js.

So it is related to a specific package and functions that it performs.

@agracio thank you for the reply; after reading further I realised the solution here is (probably) just what I need: https://github.com/JohnnyFun/NodeJsFromCSharp (pending testing of couse!)