Build apps with the Teams Toolkit and Visual Studio
The Microsoft Teams Toolkit enables you to create custom Teams apps directly within the Visual Studio integrated development environment (IDE). The Microsoft Teams toolkit guides you through the process and provides everything you need to build, debug, and launch your Teams app.
Make sure that the ASP.NET and web development module has been added to your Visual Studio instance. For more information, see Modify Visual Studio by adding or removing workloads and components.
Install the Teams Toolkit
The Microsoft Teams Toolkit for Visual Studio is available for download from the Visual Studio Marketplace or directly from the Extensions menu within Visual Studio.
Use the toolkit
Set up a new Teams project
- Launch Visual Studio 2019.
- Select Create a new project.
- Search for Microsoft Teams App and select Next.
- In the Configure your new project, enter the Project name, Location, and Solution name.
- Select Next to enter a name for the app.
- In the Additional Information screen, enter an Application Name and Developer or Company name for your Teams app.
Configure your app
At its core, the Teams app embraces three components:
The Microsoft Teams client (web, desktop or mobile) where users interact with your app.
A server that responds to requests for content displayed in Teams. For example, HTML tab content or a bot adaptive card.
A Teams app package consists of three files:
When an app is installed, the Teams client parses the manifest file to determine needed information like the name of your app and the URL where the services are located.
If you have not done so already, you must sign in to your Microsoft 365 account to continue with the development process.
If you do not have a Microsoft 365 account, you can sign up for a Microsoft 365 Developer Program subscription. It's free for 90 days and renews as long as you are using it for development activity. If you have a Visual Studio Enterprise or Professional subscription, both programs include a free Microsoft 365 developer subscription, active for the life of your Visual Studio subscription. For more information, see set up a Microsoft 365 developer subscription.
- To configure your app, select the Project > TeamsFx > Configure for SSO... menu.
When prompted, sign in to your Microsoft account that has an M365 tenant.
Install and run your app locally
Press F5 to start debugging. The app installation dialog box appears in the Teams client.
Validate your app
The Project > TeamsFx Validate > Teams Manifest menu allows you to check that your app package is valid.
Publish your app to Teams
In the Teams Developer Portal, you can upload your app to a team, submit your app to your company custom app store for users in your organization, or submit your app to App Source for all Teams users.
- Your IT admin will review these submissions.
- You can return to the Publish page to check on your submission status and learn if your app was approved or rejected by your IT admin. This is also where you can submit updates to your app or cancel any currently active submissions.