CppSharp 0.10.5

There is a newer version of this package available.
See the version list below for details.
dotnet add package CppSharp --version 0.10.5
                    
NuGet\Install-Package CppSharp -Version 0.10.5
                    
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="CppSharp" Version="0.10.5">
  <PrivateAssets>all</PrivateAssets>
  <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="CppSharp" Version="0.10.5" />
                    
Directory.Packages.props
<PackageReference Include="CppSharp">
  <PrivateAssets>all</PrivateAssets>
  <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add CppSharp --version 0.10.5
                    
#r "nuget: CppSharp, 0.10.5"
                    
#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.
#:package CppSharp@0.10.5
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=CppSharp&version=0.10.5
                    
Install as a Cake Addin
#tool nuget:?package=CppSharp&version=0.10.5
                    
Install as a Cake Tool

CppSharp is a tool and set of libraries which allows programmers to use C/C++ libraries with high-level programming languages (such as C#).

It is a tool that takes C/C++ header and library files and generates the necessary glue to surface the native API as a managed API. Such an API can be used to consume an existing native library in your high-level code or add scripting support to a native codebase.

The supported target languages at present are C# and C++/CLI.

It can also be used as a library to parse native code into a syntax tree with a rich declaration and type information model.

The NuGet version is Windows 64-bit only for the time being. Binary 32-bit releases for Windows can be found at https://github.com/mono/CppSharp/releases .

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.

NuGet packages (3)

Showing the top 3 NuGet packages that depend on CppSharp:

Package Downloads
Spout.NET

Spout.NET is a C# .NET Implementation for Spout2, A video frame sharing system.

BindingGenerator

CppSharp based binding generator for dotnet

Spout.NETCore

Package to invoke spout from c#

GitHub repositories (6)

Showing the top 6 popular GitHub repositories that depend on CppSharp:

Repository Stars
Ruslan-B/FFmpeg.AutoGen
FFmpeg auto generated unsafe bindings for C#/.NET and Core (Linux, MacOS and Mono).
ddobrev/QtSharp
Mono/.NET bindings for Qt
sdcb/OpenVINO.NET
High quality .NET wrapper for OpenVINO™ toolkit.
sdcb/Sdcb.FFmpeg
FFmpeg basic .NET API generated by CppSharp
allisterb/jemalloc.NET
A native memory manager for .NET
Dtronix/PDFiumCore
.NET Standard P/Invoke bindings for PDFium.
Version Downloads Last Updated
1.1.84.17100 1,345 11/19/2025
1.1.5.3168 77,798 10/18/2023
1.1.1.10805 7,923 10/18/2023 1.1.1.10805 is deprecated because it has critical bugs.
1.0.76.8341 8,764 10/18/2023 1.0.76.8341 is deprecated because it has critical bugs.
1.0.54.626 34,302 5/31/2023
1.0.45.22293 29,932 2/6/2023
1.0.1 63,052 12/30/2021
1.0.0 19,544 10/12/2021
0.11.2 21,450 2/4/2021
0.11.1 9,509 2/3/2021
0.11.0 9,721 1/29/2021
0.10.5 35,585 6/27/2020
0.10.4 2,673 5/23/2020
0.10.3 4,856 4/9/2020
0.10.2 6,208 3/28/2020
0.10.1 8,021 7/4/2019
0.10.0 3,301 6/25/2019
Loading failed

* Don't add ABI-specific parameters when wrapping C

* Prioritize public non-field properties when resolving naming conflicts

* Fix patching of virtual tables for MSVC with RTTI

* Free the memory of the patched v-tables

* Fix parsing of member pointers with MSVC

* Generate valid C# for constructors taking const&

* Generate valid C# for returned function pointers

* Expose returned values of non-void setters

* Ensure enumerations lack conflicts when renamed

* Fix generation for fields of type const reference