Create a new Microsoft Teams project using Microsoft Teams Toolkit

You can create Teams apps in Visual Studio using the app templates. You can search and select any of the following Teams template to create a new app.

  • Bot
  • Tab
  • Message Extension

Prerequisites

  Install For using...
  Visual Studio latest version Install the latest enterprise edition of Visual Studio, and select the ASP.NET and web development workload and Microsoft Teams Development Tools for installation.
  Teams Toolkit A Visual Studio workload that creates a project scaffolding for your app. Use the latest version.
  Microsoft Teams Microsoft Teams to upload your Teams app into local Teams environment for testing app behavior.
  Prepare your Microsoft 365 tenant Access to Microsoft 365 account with the appropriate permissions to install an app.

Create a new Teams app

To create a new Teams app, follow the steps:

  1. Open Visual Studio.

  2. Create a new app by using one of the following two options:

    • Select New project under Quick actions to select a project template.

      Screenshot shows the selection of new project from quick actions.

    • Select File > New > Project.

      Screenshot shows the selection of new project from file menu.

      The Create a new project window appears.

  3. Enter Teams in the search box and from search results, select Microsoft Teams App.

  4. Select Next.

    Screenshot shows the search and select Microsoft Teams app.

    The Configure your new project window appears.

    1. Enter a suitable name for your project.

      Note

      • The project name you enter is updated in the Solution name field. You can change the solution name with no effect on the project name.
      • You can select the Place solution and project in the same directory checkbox to save the project and solution in the same folder.
    2. Select the folder location where you want to create the project workspace.

    3. Select Create.

      Screenshot shows the configure the project name of your application.

    The Create a new Teams application window appears.

  5. Ensure Tab is selected, then select Create.

    You can select any type of Teams app for your project.

    Note

    If you want to add single sign-on (SSO) capability to your Teams app, select the Configure with single sign-on checkbox. For more information, see how to add single sign-on to your Teams apps.

    Screenshot shows the selection of teams app type.

    The GettingStarted .txt tab appears. You can see the instructions in GettingStarted window and check out the different features in Teams Toolkit.

    Screenshot shows the Getting Started teams toolkit page.

You have created the app project scaffolding for your Teams app using Teams Toolkit template.

The steps to create the other apps are similar except notification bot.

Directory Structure

Teams Toolkit provides all components for building an app. After you're created the project, you can view the project folders and files under Solution Explorer.

  • Directory structure for a basic Teams app

    Screenshot shows the tab Solution Explorer teams toolkit for basic tab.

  • Directory structure for a scenario-based Teams app

    Screenshot shows the scenario based Solution Explorer teams toolkit.

Teams app templates in Teams Toolkit

You can see Teams app templates already populated in Teams Toolkit for various Teams app types. The following table lists all the templates available:

Teams app templates Description
Notification Bot You can use the notification bot app to send notifications to your Teams client. There are multiple ways to trigger the notification. For example, trigger the notification by HTTP request, or by time. You can select triggered notification based on your business scenario.
Command Bot You can type a command to interact with the bot using the command bot app.
Workflow Bot You can interact with the bot using automate repetitive workflow action.
Tab Tab app shows a webpage inside Teams, and it enables SSO using Teams account.
Message Extension The message extension app implements simple features such as creating an Adaptive Card, searching NuGet packages, or unfurling links for the dev.botframework.com domain.

See also