← Back to Articles         
Setting Up the Development Environment for Agentic AI

Setting Up the Development Environment for Agentic AI

Published on 18 Nov 2026 6 min read Agentic AI (.NET)
Agentic AI - Fundamentals

Setting Up the Development Environment for Agentic AI

Before building our first agentic application, we need to prepare the development environment. This setup has three major goals: install the required .NET tools, establish secure access to Azure, and prepare authentication for our C# applications.

The important principle is that we should not begin enterprise AI development by downloading random scripts or putting API keys directly into configuration files. We should start with a controlled toolchain, Azure identity, and role-based access.

Local Development Environment
          |
          +-- .NET 10 SDK
          |
          +-- Visual Studio / VS Code
          |
          +-- Azure CLI
          |
          +-- Azure Account
          |
          +-- Microsoft Entra ID
          |
          +-- Secure Authentication

1. Install .NET 10 SDK

The first requirement is the .NET 10 SDK.

Agentic AI development uses modern .NET capabilities and current Microsoft AI libraries, so the development environment should use a supported modern .NET SDK.

After installation, verify it from the terminal:

dotnet --info

You should see the installed .NET SDK information, including the .NET 10 SDK.

The important distinction is that you need the SDK, not just the .NET Runtime, because the SDK contains the compiler, project templates, build tools, and other development components.

.NET SDK
   ├── C# Compiler
   ├── dotnet CLI
   ├── Project Templates
   ├── Build Tools
   └── Development Libraries

2. Choose Your Development Environment

For Windows development, Visual Studio 2026 provides a full development environment for C# and .NET.

It is particularly useful for this course because the application will eventually use modern .NET capabilities and .NET Aspire.

For macOS or Linux, Visual Studio Code with the appropriate .NET extensions is a lightweight cross-platform option.

The basic setup is:

Windows
   → Visual Studio 2026

macOS / Linux
   → Visual Studio Code + .NET SDK

Regardless of the IDE, the underlying dotnet CLI remains important because many .NET projects and automation workflows use it directly.

3. Create or Access an Azure Account

The local development environment is now ready, but the AI models need cloud infrastructure.

For this course, Azure will provide access to services such as Microsoft Foundry and Azure AI models.

If you don't already have an Azure subscription, you can create an Azure account and use the available free-account credits or a suitable subscription for experimentation.

The important architecture is:

Your Computer
      |
      | Azure CLI
      ↓
Azure Subscription
      |
      ↓
Microsoft Foundry
      |
      ↓
AI Models

The Azure subscription becomes the cloud boundary in which the AI resources are provisioned.

4. Install Azure CLI

The next requirement is the Azure Command-Line Interface (Azure CLI).

Azure CLI allows you to manage Azure resources directly from your terminal.

After installing it, verify the installation:

az version

If the command successfully returns the Azure CLI version information, the installation is complete.

Azure CLI becomes particularly useful because you can automate Azure operations instead of manually performing every operation through the Azure Portal.

For example:

Terminal
   ↓
Azure CLI
   ↓
Azure Resource
   ↓
Microsoft Foundry

5. Authenticate Using az login

The next step is authentication.

Run:

az login

This normally opens a browser where you authenticate using your Microsoft account / Microsoft Entra ID.

After successful authentication, your terminal session becomes associated with the Azure identity and subscription you have access to.

You can verify your available Azure subscriptions with:

az account list

You can select the required subscription using:

az account set --subscription "<subscription-name-or-id>"

The exact subscription you select depends on where you intend to create your AI resources.

6. Why az login Is Important for C# Applications

This is one of the most important concepts in the setup.

We don't want to do this:

{
  "ApiKey": "my-secret-api-key"
}

Hard-coding credentials or storing sensitive API keys in application configuration creates unnecessary security risks.

Instead, the application can use Azure Identity.

A common approach during local development is AzureCliCredential, which can use the identity established by:

az login

Conceptually:

Developer
    ↓
az login
    ↓
Microsoft Entra ID
    ↓
Azure Identity
    ↓
C# Application
    ↓
Azure AI Service

This means your C# application can authenticate using your developer identity rather than embedding an API key into the source code.

7. Azure Identity in .NET

The Azure SDK provides the Azure.Identity package for authentication.

For example, conceptually:

using Azure.Identity;

var credential = new AzureCliCredential();

Your application can then use this credential when connecting to Azure services that support Microsoft Entra authentication.

For applications that run in Azure, the authentication approach can later move from AzureCliCredential to Managed Identity.

That gives us a useful development-to-production model:

Local Development
       ↓
Azure CLI Credential
       ↓
Microsoft Entra ID
       ↓
Azure Service

Production
       ↓
Managed Identity
       ↓
Microsoft Entra ID
       ↓
Azure Service

This avoids designing the application around hard-coded secrets.

8. Why Microsoft Entra ID Is Central

Microsoft Entra ID acts as the identity layer for the Azure environment.

Instead of asking:

"What API key does this application have?"

we can ask:

"Which identity is calling this service, and what permissions does that identity have?"

This leads naturally to Role-Based Access Control (RBAC).

For example:

C# Application
      ↓
Managed Identity / Azure Identity
      ↓
Microsoft Entra ID
      ↓
RBAC
      ↓
Microsoft Foundry / Azure AI

The identity receives only the permissions required for the application.

This follows the principle of least privilege.

9. Development Environment Checklist

At the end of this setup, your local environment should have:

Component Purpose
.NET 10 SDK Build and run C# applications
Visual Studio 2026 / VS Code Development environment
Azure Account Access to Azure resources
Azure CLI Manage and authenticate with Azure
Microsoft Entra ID Identity and authentication
Azure Identity Secure authentication from C#

The basic verification commands are:

dotnet --info
az version
az login

10. Complete Setup Flow

The development environment is now ready for the next stage:

                 Local Computer
                      |
        +-------------+-------------+
        |                           |
    .NET 10 SDK                 Azure CLI
        |                           |
    C# Application               az login
        |                           |
        |                     Microsoft Entra ID
        |                           |
        +-------------+-------------+
                      |
                Azure Subscription
                      |
                      ↓
              Microsoft Foundry
                      |
                      ↓
                 AI Models

The key idea is that Agentic AI development starts with infrastructure and identity, not with the agent code itself.

Once .NET is installed, Azure CLI is authenticated, and the Azure subscription is ready, we have a secure foundation for the next step: provisioning the required AI models and Microsoft Foundry resources.

← Back to Articles