go.gen 1.26.10.3

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

go.gen — go2cs source generator

go.gen is the Roslyn source generator / analyzer used by go2cs to emit the compile-time C# glue that makes converted Go code behave like Go:

  • interface satisfaction (duck-typed GoImplement wiring),
  • pointer-receiver method overloads,
  • implicit type-alias conversions,
  • struct embedding / promotion,
  • lazily built package variables,
  • field access through pointers reinterpreted from unsafe.Pointer,
  • throwing stubs for Go functions with no Go body (assembly or cgo),
  • Go-string boxing for string literals passed to any parameters,
  • the records Go reflection reads (channel directions, struct member facts, container operations).

Two analyzers ship with the generator and fail the build when a C# string literal binds a C# type where Go has a string, or when a stack-append buffer is passed as anything but a plain local.

Install go.gen when you convert your own Go code to C# with go2cs — the generator must run at compile time so the generated members are available. The pre-converted Go standard-library packages (go.fmt, go.strings, …) already have this glue baked into their compiled assemblies, so consuming those packages does not require go.gen.

This is a development-time dependency (analyzer); it ships no runtime assembly.

License

MIT. See the go2cs repository.

Artwork licensed under Creative Commons Attribution 3.0; see artwork attribution.

There are no supported framework assets in this 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

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.26.10.3 191 11/9/2026
1.26.10.2 131 11/4/2026
1.26.10.1 133 10/26/2026
1.24.13.7 120 10/14/2026
1.24.13.6 116 10/12/2026
1.24.13.5 113 10/9/2026
1.24.13.4 117 10/6/2026
1.24.13.3 114 10/2/2026
1.24.13.2 104 9/24/2026
1.24.13.1 108 9/24/2026
1.23.12.3 130 9/8/2026
1.23.12.2 120 8/29/2026
1.23.12.1 113 8/26/2026
1.23.1.7 121 8/23/2026
1.23.1.6 126 8/11/2026
1.23.1.5 118 8/9/2026
1.23.1.4 120 8/8/2026
1.23.1.3 125 8/4/2026
1.23.1.2 129 7/27/2026
1.23.1.1 152 7/14/2026