Leggere in inglese Modifica

Condividi tramite

Build your first app using Blazor

Create project workspace for your bot app

Start Teams app development by creating your first app. This app uses the bot capability.

Screenshot displaying workspace for your bot app.

Create your bot project

  1. Open Visual Studio.

  2. Select Create a new project.

    Screenshot shows Visual Studio 2022 with Create a new project.

    The Create a new project page appears.

  3. In the search box, enter Microsoft Teams. From the search results, select Microsoft Teams App.

  4. Select Next.

    Screenshot shows Create a new project with Next option.

    The Configure your new project window appears.

  5. Enter Project name and select Create.

    Screenshot of Configure your new project with Create option highlighted in red.

    The Create a new Teams application window appears.

  6. Select Teams app feature.

  7. Select the Command Bot app as the capability for your app.

  8. Select Create.

    Screenshot of Create a new Teams application with Command Bot and Create options highlighted in red.

    Your Teams bot app is created in a few seconds.

    Screenshot of Visual Studio displaying the information of getting started with Teams Toolkit.

A quick recap of creating a Teams bot app. Watch this short recap for creating a Teams bot app.

Graphical representation shows the process of creating the  jTeams bot app.

Take a tour of the source code for Teams bot app

After project creation, you have the components to build a basic personal app. You can view the project directory structure in the Solution Explorer area of the latest Visual Studio.

Screenshot of Solution Explorer with BlazorApp highlighted.

Teams Toolkit creates a scaffolding for your project based on the capabilities you selected. Among other files, Teams Toolkit maintains:

Folder name Contents
App icons The app icons are stored as PNG files in color.png and outline.png.
manifest.json The app manifest for publishing through the Developer Portal for Teams is stored in Properties/manifest.json.
BackendController.cs A backend controller is provided in Controllers/BackendController.cs for assisting with authentication.
TeamsFx.cs and JS/src/index.js The content is used for initializing communications with the Teams host.

You can add backend functionality by adding other ASP.NET Core controllers to your application.