Expert guidance for integrating FeatBit .NET Server SDK in .NET applications. Use when user asks about ".NET SDK", "C# feature flags", "ASP.NET Core FeatBit", "dependency injection", "console app integration", "OpenFeature .NET", or mentions .cs, .csproj, Program.cs files.
View on GitHubFebruary 3, 2026
Select agents to install to:
npx add-skill https://github.com/featbit/featbit-skills/blob/main/skills/featbit-dotnet-sdk/SKILL.md -a claude-code --skill featbit-dotnet-sdkInstallation paths:
.claude/skills/featbit-dotnet-sdk/# FeatBit .NET Server SDK Integration
Expert guidance for integrating the FeatBit .NET Server-Side SDK into .NET applications, including ASP.NET Core, console applications, and worker services.
## When to Use This Skill
Activate when users:
- Ask about .NET SDK integration or setup
- Need dependency injection configuration for ASP.NET Core
- Want to evaluate feature flags in C# code
- Ask about console applications, worker services, or background services
- Need examples of flag variations (bool, string, int, double, JSON)
- Want to implement A/B testing with custom events
- Mention offline mode or bootstrapping from JSON
- Ask about OpenFeature integration or vendor-neutral feature flagging
## Prerequisites
Before integration, obtain:
- **Environment Secret**: [How to get it](https://docs.featbit.co/sdk/faq#how-to-get-the-environment-secret)
- **SDK URLs**: [How to get them](https://docs.featbit.co/sdk/faq#how-to-get-the-sdk-urls)
## Quick Start
### Installation
```bash
dotnet add package FeatBit.ServerSdk
```
### Basic Console App Example
```csharp
using FeatBit.Sdk.Server;
using FeatBit.Sdk.Server.Model;
using FeatBit.Sdk.Server.Options;
// Setup SDK options
var options = new FbOptionsBuilder("<replace-with-your-env-secret>")
.Event(new Uri("https://app-eval.featbit.co"))
.Streaming(new Uri("wss://app-eval.featbit.co"))
.Build();
// Create client instance
var client = new FbClient(options);
if (!client.Initialized)
{
Console.WriteLine("FbClient failed to initialize. Using fallback values.");
}
// Create user
var user = FbUser.Builder("user-key-123")
.Name("User Name")
.Custom("role", "admin")
.Build();
// Evaluate feature flag
var isEnabled = client.BoolVariation("game-runner", user, defaultValue: false);
Console.WriteLine($"Feature enabled: {isEnabled}");
// Close client before exit
await client.CloseAsync();
```
## ASP.NET Core Integration
### Setup with Dependency Injection
```csharp
using FeatBit.Sdk.Server.Depend