You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
.NET Ecosystem Support in AWF Agent Container and Agentic Workflows
Summary
This discussion documents the findings from testing .NET/C# agentic workflows with the AWF (Agentic Workflow Firewall) agent container. Three popular C# repositories were tested successfully:
The AWF agent container (ghcr.io/githubnext/gh-aw-firewall/agent) is based on Ubuntu and does NOT have .NET pre-installed. The SDK is provided through:
The actions/setup-dotnet action running on the host
Mount of /opt/hostedtoolcache into the container
This approach keeps the container lightweight while supporting multiple runtime versions.
Example Working Workflow
Here is a complete example of a working .NET agentic workflow:
---
name: Build and Test C# Projectengine: copiloton:
workflow_dispatch:
runtimes:
dotnet:
version: "8.0"network:
firewall: trueallowed:
- defaults
- nuget.org
- api.nuget.orgpermissions:
contents: readissues: readpull-requests: read
---
# Build and TestYou are a C# developer. Your task is to build and test this .NET project.## Steps1. Explore the repository structure to find the solution file (.sln or .slnx)2. Restore NuGet packages using `dotnet restore`3. Build the solution using `dotnet build`4. Run the tests using `dotnet test`5. Report the results
Verified Test Results
All three test repositories successfully completed build and test workflows:
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
.NET Ecosystem Support in AWF Agent Container and Agentic Workflows
Summary
This discussion documents the findings from testing .NET/C# agentic workflows with the AWF (Agentic Workflow Firewall) agent container. Three popular C# repositories were tested successfully:
How .NET Support Works
The
runtimes:Frontmatter FieldTo use .NET in agentic workflows, you must specify the runtime in the workflow frontmatter:
Key points:
runtimes:(plural) with nested structure, NOTruntime:(singular)What Happens During Compilation
When you compile a workflow with
runtimes: dotnet, gh-aw:actions/setup-dotnet@v4step before the agent step/opt/hostedtoolcacheon the GitHub runner/opt/hostedtoolcache:/opt/hostedtoolcache:roRequired Network Domains
For .NET/NuGet package restore to work through the firewall, include these domains:
The
defaultspreset includes additional Microsoft and NuGet CDN domains needed for SDK downloads and package restore.Common Issues and Solutions
Issue 1: "dotnet: command not found"
Cause: Missing
runtimes:field in frontmatterSolution: Add the runtimes block:
Issue 2: Using incorrect syntax
runtime: dotnetCause: Using singular
runtime:instead of pluralruntimes:with nested structureWrong:
Correct:
Issue 3: NuGet restore failures
Cause: Missing network domains in firewall allowlist
Solution: Ensure
nuget.organdapi.nuget.orgare in allowed domains, or use thedefaultspreset which includes them.Issue 4: Missing GitHub MCP permissions
Cause: Workflows using GitHub MCP server toolsets need explicit permissions
Solution: Add permissions to frontmatter:
AWF Agent Container Details
The AWF agent container (
ghcr.io/githubnext/gh-aw-firewall/agent) is based on Ubuntu and does NOT have .NET pre-installed. The SDK is provided through:actions/setup-dotnetaction running on the host/opt/hostedtoolcacheinto the containerThis approach keeps the container lightweight while supporting multiple runtime versions.
Example Working Workflow
Here is a complete example of a working .NET agentic workflow:
Verified Test Results
All three test repositories successfully completed build and test workflows:
Spectre.Console
MediatR
Polly
Future Improvements
Based on this investigation, potential improvements for gh-aw:
runtimes:is missing but markdown mentions dotnet commandsReferences
All reactions