Microsoft.JavaScript.NodeApi.DotNetHost 0.7.35

Prefix Reserved
There is a newer version of this package available.
See the version list below for details.
dotnet add package Microsoft.JavaScript.NodeApi.DotNetHost --version 0.7.35                
NuGet\Install-Package Microsoft.JavaScript.NodeApi.DotNetHost -Version 0.7.35                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Microsoft.JavaScript.NodeApi.DotNetHost" Version="0.7.35" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Microsoft.JavaScript.NodeApi.DotNetHost --version 0.7.35                
#r "nuget: Microsoft.JavaScript.NodeApi.DotNetHost, 0.7.35"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Microsoft.JavaScript.NodeApi.DotNetHost as a Cake Addin
#addin nuget:?package=Microsoft.JavaScript.NodeApi.DotNetHost&version=0.7.35

// Install Microsoft.JavaScript.NodeApi.DotNetHost as a Cake Tool
#tool nuget:?package=Microsoft.JavaScript.NodeApi.DotNetHost&version=0.7.35                

Node API for .NET: JavaScript + .NET Interop

This project enables advanced interoperability between .NET and JavaScript in the same process.

  • Load .NET assemblies and call .NET APIs in-proc from a JavaScript application.
  • Load JavaScript packages and call JS APIs in-proc from a .NET application.

Interop is high-performance and supports TypeScript type-definitions generation, async (tasks/promises), streams, and more. It uses Node API so it is compatible with any Node.js version (without recompiling) or other JavaScript runtime that supports Node API.

⚠️ Status: Public Preview - Most functionality works well, though there are some known limitations around the edges, and there may still be minor breaking API changes.

Documentation

Getting-started guidance, feature details, and API reference documentation are published at https://microsoft.github.io/node-api-dotnet

Minimal example - JS calling .NET

// JavaScript
const Console = require('node-api-dotnet').System.Console;
Console.WriteLine('Hello from .NET!'); // JS writes to the .NET console API

Minimal example - .NET calling JS

// C#
interface IConsole { void Log(string message); }

var nodejs = new NodejsPlatform(libnodePath).CreateEnvironment();
nodejs.Run(() =>
{
    var console = nodejs.Import<IConsole>("global", "console");
    console.Log("Hello from JS!"); // C# writes to the JS console API
});

Packages

Depending on the scenario, either NPM or NuGet packages may be used:

See Packages & Releases for details.

Development

For information about building, testing, and debugging this project, see README-DEV.md.

Contributions require agreement to the Contributor License Agreement.

Code of Conduct

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.

Trademarks

This project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft trademarks or logos is subject to and must follow Microsoft's Trademark & Brand Guidelines. Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship. Any use of third-party trademarks or logos are subject to those third-party's policies.

<br/> <br/>

.NET + JS scene

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 is compatible.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .NETFramework 4.7.2

    • No dependencies.
  • .NETStandard 2.0

  • net6.0

    • No dependencies.
  • net8.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
0.8.16 173 10/15/2024
0.8.15 91 10/4/2024
0.8.14 92 10/3/2024
0.8.13 107 9/23/2024
0.8.9 152 9/6/2024
0.8.8 106 9/4/2024
0.8.7 171 9/3/2024
0.8.6 106 9/3/2024
0.8.5 78 9/1/2024
0.8.4 94 9/1/2024
0.8.3 115 8/19/2024
0.8.2 105 8/16/2024
0.8.1 113 8/15/2024
0.7.42 103 8/14/2024
0.7.41 112 8/13/2024
0.7.40 115 8/12/2024
0.7.39 99 8/12/2024
0.7.38 110 8/8/2024
0.7.37 93 8/6/2024
0.7.36 109 8/1/2024
0.7.35 54 8/1/2024
0.7.34 86 7/27/2024
0.7.33 85 7/24/2024
0.7.32 79 7/24/2024
0.7.31 78 7/22/2024
0.7.30 96 7/17/2024
0.7.29 95 7/16/2024
0.7.28 89 7/15/2024
0.7.26 92 7/12/2024
0.7.19 173 6/21/2024
0.7.18 125 6/17/2024
0.7.17 99 6/14/2024
0.7.16 110 6/14/2024
0.7.14 157 5/16/2024
0.7.13 94 5/15/2024
0.7.12 87 5/14/2024
0.7.11 116 5/9/2024
0.7.10 173 5/6/2024
0.7.9 90 5/2/2024
0.7.8 183 4/19/2024
0.7.7 120 4/17/2024
0.7.6 122 4/16/2024
0.7.5 149 4/14/2024
0.7.4 135 4/12/2024
0.7.3 129 4/11/2024
0.7.2 128 4/10/2024
0.7.1 131 4/8/2024
0.6.8 129 4/8/2024
0.6.7 135 4/8/2024
0.6.6 143 4/8/2024
0.6.5 139 4/5/2024
0.6.4 132 4/5/2024
0.6.3 153 3/29/2024
0.6.2 133 3/27/2024
0.6.1 219 3/26/2024
0.5.19 150 3/23/2024
0.5.18 137 3/21/2024
0.5.17 112 3/21/2024
0.5.16 145 3/20/2024
0.5.15 135 3/20/2024
0.5.14 137 3/20/2024
0.5.13 116 3/14/2024
0.5.12 132 3/12/2024
0.5.11 144 3/12/2024
0.5.10 128 3/12/2024
0.5.8 153 3/12/2024