Microsoft.Windows.CsWin32 0.3.371

Prefix Reserved
dotnet add package Microsoft.Windows.CsWin32 --version 0.3.371
                    
NuGet\Install-Package Microsoft.Windows.CsWin32 -Version 0.3.371
                    
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.Windows.CsWin32" Version="0.3.371">
  <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="Microsoft.Windows.CsWin32" Version="0.3.371" />
                    
Directory.Packages.props
<PackageReference Include="Microsoft.Windows.CsWin32">
  <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 Microsoft.Windows.CsWin32 --version 0.3.371
                    
#r "nuget: Microsoft.Windows.CsWin32, 0.3.371"
                    
#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 Microsoft.Windows.CsWin32@0.3.371
                    
#: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=Microsoft.Windows.CsWin32&version=0.3.371
                    
Install as a Cake Addin
#tool nuget:?package=Microsoft.Windows.CsWin32&version=0.3.371
                    
Install as a Cake Tool

Automated generation of C# bindings for the Win32 API

Get immediate access to the full Win32 API from C#, just by naming the APIs you require. Generated APIs will be accurate for your CPU architecture and target Windows version. All APIs are generated directly into your project, allowing you to ship without any additional runtime dependencies.

Reach functionality that .NET doesn't expose via the Base Class Library (BCL) to give your library or application that feature that really sets it apart.

Install this package, then create a NativeMethods.txt file with a list of any APIs you need for example:

NativeMethods.txt:

CreateFile
IUIRibbon
S_OK
NTSTATUS
IsPwrHibernateAllowed
ISpellChecker

Any supporting APIs (e.g. enums, structs) are automatically generated when they are required by what you've directly asked for.

Call extern methods through the PInvoke class

using SafeHandle f = PInvoke.CreateFile(
    "some.txt",
    (uint)GENERIC_ACCESS_RIGHTS.GENERIC_READ,
    FILE_SHARE_MODE.FILE_SHARE_READ,
    lpSecurityAttributes: null,
    FILE_CREATION_DISPOSITION.CREATE_ALWAYS,
    FILE_FLAGS_AND_ATTRIBUTES.FILE_ATTRIBUTE_NORMAL,
    hTemplateFile: null);

Learn more from our README on GitHub.

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  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 was computed.  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.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
.NET Core netcoreapp1.0 was computed.  netcoreapp1.1 was computed.  netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard1.0 is compatible.  netstandard1.1 was computed.  netstandard1.2 was computed.  netstandard1.3 was computed.  netstandard1.4 was computed.  netstandard1.5 was computed.  netstandard1.6 was computed.  netstandard2.0 was computed.  netstandard2.1 was computed. 
.NET Framework net20 is compatible.  net35 was computed.  net40 was computed.  net403 was computed.  net45 was computed.  net451 was computed.  net452 was computed.  net46 was computed.  net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen30 was computed.  tizen40 was computed.  tizen60 was computed. 
Universal Windows Platform uap was computed.  uap10.0 was computed. 
Windows Phone wp8 was computed.  wp81 was computed.  wpa81 was computed. 
Windows Store netcore was computed.  netcore45 was computed.  netcore451 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.

NuGet packages (3)

Showing the top 3 NuGet packages that depend on Microsoft.Windows.CsWin32:

Package Downloads
Morphic.WindowsNative

Morphic Windows Native features library (C#)

SystemHarness.Windows

Windows implementation of SystemHarness — Win32, DXGI, SendInput primitives.

OverlaySharp

Draws graphics using SkiaSharp(OpenGL) on a transparent window for a target process, with full Native AOT compatibility.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.3.371 7,307 11/10/2026
0.3.369 10,443 11/6/2026
0.3.367 87,648 10/22/2026
0.3.366 18,171 10/19/2026
0.3.363 48,914 10/14/2026
0.3.360 27,374 10/8/2026
0.3.358 6,554 10/7/2026
0.3.355 10,860 10/6/2026
0.3.347 6,159 10/5/2026
0.3.346 31,202 10/2/2026
0.3.335 62,030 9/21/2026
0.3.333 112,656 9/3/2026
0.3.330 6,096 9/2/2026
0.3.321 69,699 8/17/2026
0.3.298 230,227 6/17/2026
0.3.296 15,446 6/14/2026
0.3.287 15,768 6/11/2026
0.3.275 164,417 4/15/2026
0.3.269 265,696 1/16/2026
0.3.264 105,667 12/13/2025
Loading failed