CommunityToolkit.Aspire.Hosting.Golang 9.7.0

Prefix Reserved
There is a newer prerelease version of this package available.
See the version list below for details.
dotnet add package CommunityToolkit.Aspire.Hosting.Golang --version 9.7.0
                    
NuGet\Install-Package CommunityToolkit.Aspire.Hosting.Golang -Version 9.7.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="CommunityToolkit.Aspire.Hosting.Golang" Version="9.7.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="CommunityToolkit.Aspire.Hosting.Golang" Version="9.7.0" />
                    
Directory.Packages.props
<PackageReference Include="CommunityToolkit.Aspire.Hosting.Golang" />
                    
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 CommunityToolkit.Aspire.Hosting.Golang --version 9.7.0
                    
#r "nuget: CommunityToolkit.Aspire.Hosting.Golang, 9.7.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.
#:package CommunityToolkit.Aspire.Hosting.Golang@9.7.0
                    
#: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=CommunityToolkit.Aspire.Hosting.Golang&version=9.7.0
                    
Install as a Cake Addin
#tool nuget:?package=CommunityToolkit.Aspire.Hosting.Golang&version=9.7.0
                    
Install as a Cake Tool

CommunityToolkit.Aspire.Hosting.Golang library

Provides extensions methods and resource definitions for the .NET Aspire AppHost to support running Golang applications.

Getting Started

Install the package

In your AppHost project, install the package using the following command:

dotnet add package CommunityToolkit.Aspire.Hosting.Golang

Example usage

Then, in the Program.cs file of AppHost, define a Golang resource, then call AddGolangApp:

var golang = builder.AddGolangApp("golang", "../gin-api")
    .WithHttpEndpoint(env: "PORT");

The PORT environment variable is used to determine the port the Golang application should listen on. It is randomly assigned by the .NET Aspire. The name of the environment variable can be changed by passing a different value to the WithHttpEndpoint method.

To have the Golang application listen on the correct port, you can use the following code in your Golang application:

r.Run(":"+os.Getenv("PORT"))

Additional Information

https://learn.microsoft.com/dotnet/aspire/community-toolkit/hosting-golang

Feedback & contributing

https://github.com/CommunityToolkit/Aspire

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  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 is compatible.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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
9.7.1-beta.348 93 8/14/2025
9.7.1-beta.344 62 8/10/2025
9.7.1-beta.343 200 8/8/2025
9.7.1-beta.342 190 8/7/2025
9.7.1-beta.341 193 8/6/2025
9.7.1-beta.340 175 8/5/2025
9.7.1-beta.339 174 8/5/2025
9.7.0 107 8/1/2025
9.7.0-beta.337 72 8/1/2025
9.7.0-beta.336 82 8/1/2025
9.7.0-beta.335 83 8/1/2025
9.7.0-beta.333 91 7/30/2025
9.6.1-beta.332 91 7/30/2025
9.6.1-beta.331 90 7/30/2025
9.6.1-beta.330 87 7/30/2025
9.6.1-beta.329 90 7/30/2025
9.6.1-beta.328 92 7/29/2025
9.6.1-beta.327 91 7/28/2025
9.6.1-beta.326 92 7/28/2025
9.6.0 152 7/10/2025
9.6.0-beta.324 113 7/10/2025
9.5.1-beta.323 112 7/10/2025
9.5.1-beta.322 120 7/10/2025
9.5.1-beta.321 115 7/10/2025
9.5.1-beta.320 113 7/9/2025
9.5.1-beta.319 114 7/8/2025
9.5.1-beta.318 118 7/2/2025
9.5.1-beta.317 112 6/30/2025
9.5.1-beta.315 117 6/26/2025
9.5.1-beta.314 121 6/23/2025
9.5.1-beta.313 111 6/20/2025
9.5.1-beta.312 113 6/20/2025
9.5.1-beta.311 133 6/18/2025
9.5.1-beta.310 127 6/17/2025
9.5.1-beta.309 120 6/17/2025
9.5.1-beta.308 123 6/17/2025
9.5.1-beta.307 210 6/16/2025
9.5.1-beta.306 269 6/11/2025
9.5.1-beta.305 94 6/7/2025
9.5.1-beta.304 113 6/6/2025
9.5.1-beta.303 116 6/4/2025
9.5.1-beta.302 119 6/4/2025
9.5.1-beta.301 123 6/2/2025
9.5.1-beta.300 133 5/28/2025
9.5.0 301 5/27/2025
9.5.0-beta.299 126 5/27/2025
9.5.0-beta.298 125 5/26/2025
9.5.0-beta.297 82 5/24/2025
9.5.0-beta.296 78 5/24/2025
9.5.0-beta.295 51 5/24/2025
9.4.1-beta.291 129 5/19/2025
9.4.1-beta.289 140 5/16/2025
9.4.1-beta.288 191 5/16/2025
9.4.1-beta.287 186 5/16/2025
9.4.1-beta.286 187 5/16/2025
9.4.1-beta.285 205 5/14/2025
9.4.1-beta.284 213 5/13/2025
9.4.1-beta.283 210 5/12/2025
9.4.1-beta.282 123 5/7/2025
9.4.1-beta.280 122 5/2/2025
9.4.1-beta.279 125 5/2/2025
9.4.1-beta.277 139 4/23/2025
9.4.1-beta.276 135 4/23/2025
9.4.1-beta.275 136 4/23/2025
9.4.1-beta.274 143 4/23/2025
9.4.1-beta.273 141 4/23/2025
9.4.1-beta.272 139 4/23/2025
9.4.1-beta.271 138 4/23/2025
9.4.1-beta.270 156 4/20/2025
9.4.0 196 4/20/2025
9.4.0-beta.269 155 4/20/2025
9.4.0-beta.268 139 4/20/2025
9.3.1-beta.267 137 4/20/2025
9.3.1-beta.266 66 4/19/2025
9.3.1-beta.265 169 4/15/2025
9.3.1-beta.264 169 4/15/2025
9.3.1-beta.263 165 4/15/2025
9.3.1-beta.262 169 4/15/2025
9.3.1-beta.260 140 4/10/2025
9.3.1-beta.259 142 4/8/2025
9.3.1-beta.258 138 4/8/2025
9.3.1-beta.257 143 4/8/2025
9.3.1-beta.256 137 4/8/2025
9.3.1-beta.255 140 4/8/2025
9.3.1-beta.254 134 4/8/2025
9.3.1-beta.253 139 4/1/2025
9.3.1-beta.252 119 3/27/2025
9.3.1-beta.250 128 3/27/2025
9.3.1-beta.249 125 3/27/2025
9.3.1-beta.248 124 3/27/2025
9.3.1-beta.247 123 3/27/2025
9.3.1-beta.244 472 3/25/2025
9.3.1-beta.242 460 3/24/2025
9.3.1-beta.241 143 3/19/2025
9.3.0 194 3/19/2025
9.3.0-beta.239 127 3/19/2025
9.2.2-beta.237 138 3/19/2025
9.2.2-beta.236 104 3/14/2025
9.2.2-beta.230 126 3/13/2025
9.2.2-beta.229 132 3/13/2025
9.2.2-beta.228 146 3/11/2025
9.2.2-beta.227 141 3/11/2025
9.2.2-beta.226 147 3/11/2025
9.2.2-beta.225 133 3/11/2025
9.2.2-beta.224 140 3/11/2025
9.2.2-beta.223 135 3/10/2025
9.2.2-beta.222 151 3/10/2025
9.2.2-beta.220 159 3/9/2025
9.2.2-beta.218 147 3/9/2025
9.2.2-beta.217 183 3/7/2025
9.2.2-beta.216 177 3/7/2025
9.2.2-beta.215 183 3/7/2025
9.2.2-beta.214 180 3/5/2025
9.2.2-beta.213 173 3/5/2025
9.2.2-beta.212 187 3/5/2025
9.2.2-beta.211 189 3/4/2025
9.2.2-beta.210 185 3/4/2025
9.2.2-beta.208 70 3/3/2025
9.2.1 135 3/3/2025
9.2.1-beta.207 100 3/2/2025
9.2.1-beta.206 72 3/1/2025
9.2.1-beta.205 79 2/27/2025
9.2.1-beta.204 65 2/26/2025
9.2.1-beta.203 66 2/26/2025
9.2.0 345 2/26/2025
9.2.0-beta.202 79 2/26/2025
9.2.0-beta.201 81 2/26/2025
9.2.0-beta.199 78 2/26/2025
9.2.0-beta.198 72 2/26/2025
9.1.1-beta.197 76 2/25/2025
9.1.1-beta.196 74 2/25/2025
9.1.1-beta.195 67 2/25/2025
9.1.1-beta.194 69 2/25/2025
9.1.1-beta.193 77 2/25/2025
9.1.1-beta.192 76 2/24/2025
9.1.1-beta.191 75 2/24/2025
9.1.1-beta.190 84 2/19/2025
9.1.1-beta.189 73 2/19/2025
9.1.1-beta.188 81 2/19/2025
9.1.1-beta.187 82 2/19/2025
9.1.1-beta.183 86 2/18/2025
9.1.1-beta.182 88 2/18/2025
9.1.1-beta.181 101 2/18/2025
9.1.1-beta.180 83 2/17/2025
9.1.1-beta.178 86 2/17/2025
9.1.1-beta.177 89 2/12/2025
9.1.1-beta.176 86 2/11/2025
9.1.1-beta.175 83 2/11/2025
9.1.1-beta.173 95 2/10/2025
9.1.1-beta.169 69 2/6/2025
9.1.1-beta.168 82 2/5/2025
9.1.1-beta.166 68 2/5/2025
9.1.1-beta.165 74 2/5/2025
9.1.1-beta.164 78 2/3/2025
9.1.1-beta.162 73 2/3/2025
9.1.1-beta.155 74 1/30/2025
9.1.1-beta.154 64 1/30/2025
9.1.1-beta.153 67 1/30/2025
9.1.1-beta.152 63 1/29/2025
9.1.1-beta.150 80 1/29/2025
9.1.1-beta.148 73 1/26/2025
9.1.1-beta.147 77 1/26/2025
9.1.1-beta.146 74 1/23/2025
9.1.1-beta.145 70 1/22/2025
9.1.1-beta.144 70 1/22/2025
9.1.1-beta.142 63 1/22/2025
9.1.1-beta.140 82 1/22/2025
9.1.1-beta.139 67 1/21/2025
9.1.1-beta.138 74 1/20/2025
9.1.1-beta.137 58 1/17/2025
9.1.1-beta.136 70 1/15/2025
9.1.1-beta.135 39 1/15/2025
9.1.1-beta.134 45 1/15/2025
9.1.1-beta.128 63 1/9/2025
9.1.1-beta.127 60 1/9/2025
9.1.1-beta.126 68 1/9/2025
9.1.1-beta.125 69 1/9/2025
9.1.1-beta.124 67 1/9/2025
9.1.0 1,406 12/12/2024
9.1.0-beta.123 85 1/3/2025
9.1.0-beta.122 78 1/3/2025
9.1.0-beta.121 86 1/2/2025
9.1.0-beta.120 75 12/30/2024
9.1.0-beta.119 78 12/30/2024
9.1.0-beta.118 73 12/30/2024
9.1.0-beta.116 75 12/30/2024
9.1.0-beta.114 74 12/30/2024
9.1.0-beta.113 75 12/30/2024
9.1.0-beta.112 80 12/18/2024
9.1.0-beta.110 81 12/16/2024
9.1.0-beta.109 87 12/12/2024
9.0.1-beta.108 75 12/12/2024
9.0.1-beta.107 86 12/11/2024
9.0.1-beta.106 79 12/12/2024
9.0.1-beta.104 75 12/11/2024
9.0.1-beta.102 71 12/6/2024
9.0.1-beta.99 81 12/6/2024
9.0.1-beta.98 72 12/6/2024
9.0.1-beta.95 67 12/5/2024
9.0.1-beta.94 75 12/5/2024
9.0.1-beta.93 68 12/2/2024
9.0.1-beta.92 76 11/30/2024
9.0.1-beta.91 75 11/30/2024
9.0.1-beta.90 82 11/29/2024
9.0.1-beta.89 80 11/29/2024
9.0.1-beta.88 76 11/27/2024
9.0.1-beta.87 72 11/27/2024
9.0.1-beta.86 79 11/27/2024
9.0.1-beta.84 75 11/24/2024
9.0.1-beta.83 86 11/22/2024
9.0.1-beta.82 89 11/21/2024
9.0.1-beta.81 67 11/19/2024
9.0.1-beta.80 60 11/19/2024
9.0.1-beta.79 69 11/19/2024
9.0.1-beta.77 78 11/15/2024
9.0.0 162 11/15/2024
9.0.0-beta.76 83 11/14/2024
9.0.0-beta.75 66 11/14/2024
9.0.0-beta.74 72 11/14/2024
9.0.0-beta.73 68 11/14/2024
9.0.0-beta.72 72 11/14/2024
9.0.0-beta.71 79 11/13/2024
9.0.0-beta.70 83 11/13/2024
9.0.0-beta.69 73 11/13/2024
9.0.0-beta.68 87 11/13/2024
9.0.0-beta.67 73 11/13/2024
9.0.0-beta.66 69 11/13/2024
9.0.0-beta.63 78 11/12/2024
9.0.0-beta.54 76 10/31/2024
9.0.0-beta.53 69 10/29/2024
8.3.0 137 10/29/2024
8.3.0-beta.51 78 10/29/2024
8.3.0-beta.50 71 10/28/2024
8.3.0-beta.49 75 10/28/2024
8.3.0-beta.48 65 10/28/2024
8.3.0-beta.47 77 10/28/2024
8.3.0-beta.46 72 10/27/2024
8.3.0-beta.45 77 10/25/2024
8.3.0-beta.44 84 10/25/2024
8.3.0-beta.43 75 10/25/2024
8.3.0-beta.42 78 10/24/2024
8.2.1 133 10/23/2024
8.2.1-beta.40 62 10/23/2024
8.2.1-beta.39 70 10/23/2024
8.2.1-beta.38 75 10/23/2024
8.2.1-beta.37 74 10/23/2024
8.2.1-beta.36 79 10/23/2024
8.2.1-beta.35 74 10/23/2024
8.2.0-beta.34 73 10/23/2024
8.2.0-beta.33 74 10/23/2024
8.2.0-beta.32 74 10/22/2024
1.0.0-beta.60 84 11/11/2024
1.0.0-beta.58 76 11/4/2024
1.0.0-beta.57 73 11/1/2024
1.0.0-beta.56 72 11/1/2024
1.0.0-beta.55 77 11/1/2024