> ## Documentation Index
> Fetch the complete documentation index at: https://hobbyist-e43fa225.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Set up a Microsoft Foundry project in Visual Studio Code

> Sign in to Azure, select an existing Microsoft Foundry project, or create a project with Foundry Toolkit for Visual Studio Code.

Sign in to Azure, and then select an existing Foundry project or create one with
Microsoft Foundry Toolkit for Visual Studio Code. Foundry Toolkit uses the
project you select as its default project for cloud models, agents, tools, and
evaluations.

## Prerequisites

* [Install Microsoft Foundry Toolkit for Visual Studio Code](/developer-tools-and-integrations/install-foundry-toolkit-visual-studio-code).
* An [Azure subscription](https://azure.microsoft.com/pricing/purchase-options/azure-account?cid=msft_learn).
* To select an existing project, access to that project. For more information,
  see [Role-based access control for Microsoft Foundry](../../concepts/rbac-foundry).
* To create a project, meet the
  [prerequisites to create a Foundry project](../create-projects#prerequisites).

## Sign in to Azure

Foundry Toolkit uses the account, tenant, and subscriptions available through
the Azure Resources extension.

1. In the Activity Bar, select **Azure**.
2. In the **Azure Resources** view, select **Sign in to Azure**.
3. Complete the sign-in flow.
4. In **Accounts & Tenants**, confirm that the account and tenant for your
   Foundry resources are selected.
5. In **Resources**, confirm that the target subscription is visible.

## Select an existing project

Set an accessible project as the default project for Foundry Toolkit.

1. In the Activity Bar, select **Foundry Toolkit**.
2. Under **My Resources**, select **Set Foundry Project**.
3. Select **Switch project**.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/hobbyist-e43fa225/images/set-foundry-project.png" alt="Screenshot of Foundry Toolkit showing Set Foundry Project and the choices to switch projects or create a project." />
</Frame>

1. Select the Azure subscription that contains the project.
2. Select the Foundry project.
3. Under **My Resources**, confirm that the project resources appear.

The selected project remains the default until you select another project,
clear the default project, sign out, or lose access to the project.

## Create a project

Use Foundry Toolkit to create a Foundry account and project with basic default
settings. For customized networking, security, naming, or Azure Policy
requirements, use the [Foundry portal](https://ai.azure.com/) or an
[infrastructure template](../create-resource-template).

1. In the Activity Bar, select **Foundry Toolkit**.
2. Under **My Resources**, select **Set Foundry Project**.
3. Select **Create project**.
4. Select your Azure subscription.
5. Select an existing resource group, or select **Create new resource group**.
6. If you create a resource group, enter the resource group name, and then
   select a location.
7. Enter a name for the Foundry project.
8. Monitor the notification for project creation progress.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/hobbyist-e43fa225/images/project-creation-progress.png" alt="Screenshot of a Foundry Toolkit notification showing Foundry project creation progress." />
</Frame>

1. Wait for the notification that the project deployed successfully.
2. Under **My Resources**, confirm that the new project resources appear.

Foundry Toolkit creates a Foundry account named from the project, creates the
project under that account, and sets the project as the Toolkit default.

## Switch the default project

Change the cloud project used by Foundry Toolkit without changing your Azure
account.

1. Under **My Resources**, locate the current default project.
2. Select the gear icon next to the project.
3. Select **Switch Default Project**.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/hobbyist-e43fa225/images/switch-default-project.png" alt="Screenshot of the Foundry Toolkit project actions menu with Switch Default Project selected." />
</Frame>

1. Select **Switch project**.
2. Select the subscription and another accessible project.
3. Under **My Resources**, confirm that the selected project resources appear.

To work without a cloud project, run **Foundry Toolkit: Clear Default Project**.

## Clean up resources

Selecting an existing project doesn't create Azure resources. If you created a
project in this article, its resources can incur charges.

* If you used a shared resource group, don't delete the resource group. Follow
  [Delete projects](../create-projects#delete-projects) to remove the
  project. Delete the Foundry account only if Toolkit created it for this
  procedure and it contains no other projects or resources.
* If you created a dedicated resource group and no longer need anything in it,
  open the [Azure portal](https://portal.azure.com), select the resource group,
  and select **Delete resource group**.

<Warning>
  Deleting a resource group permanently deletes every resource in it. Review
  the resource list before you confirm deletion.
</Warning>

## Related content

* [Microsoft Foundry Toolkit for Visual Studio Code overview](/developer-tools-and-integrations/get-started-projects-visual-studio-code)
* [Create a project for Microsoft Foundry](../create-projects)
* [Role-based access control for Microsoft Foundry](../../concepts/rbac-foundry)
