Building a working Visual Studio project where you can authenticate, select a deployment from Foundry, and interact with the model programmatically.
- AzureFoundryDeploymentList.slnx - Solution file (root)
- FoundryDemo/ - Console app: lists Azure AI Foundry deployments
- FoundryDemo.csproj - C# project file
- Program.cs - Main entry point with Azure AI Foundry client implementation
- FoundryClient.cs - Helper class for Azure credential management
- FoundryApi/ - ASP.NET Core Web API (Clean Architecture), see
FoundryApi/README.md
- .NET 8.0 or higher
- Azure CLI with MFA login
- Azure.AI.Projects and Azure.Identity NuGet packages
- Update the endpoint URL in
FoundryDemo/Program.cswith your Azure AI project endpoint - Run the application with your Azure CLI credentials:
dotnet run --project FoundryDemo/FoundryDemo.csproj
- The application will list all available deployments from your Foundry project