NXPorts 1.1.0

Requires NuGet 4.3 or higher.

dotnet add package NXPorts --version 1.1.0
NuGet\Install-Package NXPorts -Version 1.1.0
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="NXPorts" Version="1.1.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add NXPorts --version 1.1.0
#r "nuget: NXPorts, 1.1.0"
#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 NXPorts as a Cake Addin
#addin nuget:?package=NXPorts&version=1.1.0

// Install NXPorts as a Cake Tool
#tool nuget:?package=NXPorts&version=1.1.0

NXPorts

CI codecov

A MSBuild-integrated library/tool to expose entrypoints in .NET assemblies to the platform invocation system or short PInvoke. It allows you to build .NET libraries that can be called from any development platform that supports PInvoke, including C++, C, Rust, Delphi, Python and so on...

Getting Started

To get started you only have to add the NXPorts package to your project. That's it. NXPorts will automatically generate exports as part of your build now. Some samples are available here.

Prerequisites

This software itself will run on any system that supports developing .NET software - it does not have any dependencies on ildasm.exe, ilasm.exe or any other windows-only libraries.

Keep in mind that Reverse PInvoke - calling PInvoke entrypoints in .NET assemblies - is only officially supported in the .NET Framework. It may work in other runtimes as well, but your mileage may vary.

See Compatibility Docs for more info.

Sample

The following code will result in an exported function named SampleExportFunc:

public static class Exports {
    [DllExport(alias:"SampleExportFunc")]
    public static double Add(double a, double b)
    {
        return a + b;
    }
}

The following code will result in an exported function named Sum:

public static class Exports {
    [DllExport]
    public static double Sum(double a, double b)
    {
        return a + b;
    }
}
Product Compatible and additional computed target framework versions.
.NET Framework net is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories (1)

Showing the top 1 popular GitHub repositories that depend on NXPorts:

Repository Stars
Reloaded-Project/Reloaded.Injector
C# DLL Injection Library capable of injecting x86 DLLs to x86 process from x64 processes.
Version Downloads Last updated
1.1.0 2,080 10/31/2021
1.0.0 22,405 7/2/2020
0.2.0 1,988 12/15/2019
0.2.0-rc.1 214 12/4/2019
0.2.0-p 197 11/24/2019
0.1.0 479 8/30/2019
0.1.0-pre-fa9fc3fd3c0c72d14... 361 8/22/2019
0.1.0-pre-a834d6e9d5c65b133... 331 8/20/2019