NativeMethods 0.0.3

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

// Install NativeMethods as a Cake Tool
#tool nuget:?package=NativeMethods&version=0.0.3


Created with ❤ in Poland by
Set of tools and ready-made methods that are wrappers over the core functionalities of Windows, such as User32, Shell32 or Kernel32.

GitHub license Nuget Nuget (with prereleases) Nuget Size Sponsors

🚀 Getting started

NativeMethods is delivered via NuGet package manager. You can find the package here:

Wrapped Methods

Library Method
User32 User32.SetWindowCompositionAttribute()
Shell32 Shell32.Shell_NotifyIcon()
Kernel32 Kernel32.CopyMemory()
Gdip Gdip.GdipCreateHICONFromBitmap()
Gdi32 Gdi32.DeleteObject()

Microsoft Property

NativeMethods is based on source code provided by the .NET Foundation, WinApi headers and reverse engineer Windows libraries. The purpose of the library is to facilitate the management of WinApi via C# and it's designed exclusively for Windows systems.


Use Visual Studio 2022 and invoke the .sln.

Visual Studio
NativeMethods is an Open Source project. You are entitled to download and use the freely available Visual Studio Community Edition to build, run or develop for NativeMethods. As per the Visual Studio Community Edition license, this applies regardless of whether you are an individual or a corporate user.

Code of Conduct

This project has adopted the code of conduct defined by the Contributor Covenant to clarify expected behavior in our community.


NativeMethods is free and open source software licensed under MIT License. You can use it in private and commercial projects.
Keep in mind that you must include a copy of the license in your project.

Product Versions
.NET net5.0 net5.0-windows net5.0-windows7.0 net6.0 net6.0-android net6.0-ios net6.0-maccatalyst net6.0-macos net6.0-tvos net6.0-windows net6.0-windows7.0 net7.0 net7.0-android net7.0-ios net7.0-maccatalyst net7.0-macos net7.0-tvos net7.0-windows net7.0-windows7.0
.NET Core netcoreapp3.1
.NET Framework net46 net461 net462 net463 net47 net471 net472 net48 net481
Compatible target framework(s)
Additional computed target framework(s)
Learn more about Target Frameworks and .NET Standard.
  • .NETCoreApp 3.1

    • No dependencies.
  • .NETFramework 4.6

    • No dependencies.
  • .NETFramework 4.7

    • No dependencies.
  • .NETFramework 4.8

    • No dependencies.
  • net5.0-windows7.0

    • No dependencies.
  • net6.0-windows7.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.0.3 1,314 5/9/2022
0.0.2 294 5/8/2022
0.0.1 297 5/8/2022