Claude SDK for C# 12.44.0
Last reviewed Sep 24, 2026
Prompt Details
Prompt Composition
2prompts
- C# 14106 lines · 4.4K tokens
- Claude SDK for C# 12.44.072 lines · 3.1K tokens
Total178 lines · 7.5K tokens
CWE Coverage
- 20
- 22
- 59
- 78
- 89
- 94
- 117
- 190
- 201
- 208
- 209
- 214
- 257
- 295
- 323
- 327
- 338
- 347
- 362
- 367
- 378
- 426
- 502
- 532
- 611
- 639
- 672
- 674
- 759
- 770
- 772
- 775
- 798
- 841
- 862
- 863
- 915
- 916
- 918
- 1333
- 1395
- 1426
- 1427
Prompt Preview
Apply the C# 14 baseline first. These rules cover the official Anthropic NuGet package 12.44.0 with C# 14 on .NET 10, including Messages, automatic tool execution, files, batches, and opt-in Managed Agents features.
Clients and credentials
- Reference the official
Anthropicpackage, letdotnet package add Anthropicchoose the release, and lock what resolves. The same package ID also carries the former community package's older releases, which continue astryAGI.Anthropic, so never type anAnthropicversion from memory. Its dependencies, includingSystem.Text.Json,System.Net.ServerSentEvents, andMicrosoft.Extensions.AI.Abstractions, are declared as minimums that don't track security fixes, so audit the versions that actually resolve and raise any that audit flags. - Construct
AnthropicClientin trusted server code with an explicitClientOptionsargument. Set the intended credentials andBaseUrlbefore construction: the parameterless constructor can discover credentials, workspace headers, and a base URL from environment variables and local profiles before object initializers run. - Select one authentication mechanism deliberately. For API-key authentication, explicitly set
AuthToken = nullto suppressANTHROPIC_AUTH_TOKEN; for bearer-only authentication, suppress the API key. Explicit non-nullApiKeyorAuthTokentakes precedence overCredentials, and static key/token headers can otherwise both be sent. - Keep
BaseUrl,ANTHROPIC_BASE_URL,HttpClient,Handlers, proxy settings, andClientOptions.ExtraHeadersunder deployment