Last active
August 7, 2023 08:54
-
-
Save garrytrinder/c1bcde20cf2dbebc43f16300244a0db7 to your computer and use it in GitHub Desktop.
Bring your existing project to Teams Toolkit for Visual Studio 2022
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
TEAMSFX_ENV=local | |
BOT_DOMAIN= | |
CONNECTION_NAME= | |
MICROSOFT_APP_ID= | |
MICROSOFT_APP_TYPE= | |
MICROSOFT_APP_TENANT_ID= | |
TEAMS_APP_ID= |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SECRET_MICROSOFT_APP_PASSWORD= |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.12/MicrosoftTeams.schema.json", | |
"manifestVersion": "1.12", | |
"version": "1.0.1", | |
"id": "${{TEAMS_APP_ID}}", | |
"packageName": "com.microsoft.teams.extension", | |
"developer": { | |
"name": "Teams App, Inc.", | |
"websiteUrl": "https://example.azurewebsites.net", | |
"privacyUrl": "https://example.azurewebsites.net/privacy", | |
"termsOfUseUrl": "https://example.azurewebsites.net/termsofuse" | |
}, | |
"icons": { | |
"color": "color.png", | |
"outline": "outline.png" | |
}, | |
"name": { | |
"short": "Conversation Bot", | |
"full": "Conversation Bot" | |
}, | |
"description": { | |
"short": "Short description for Conversation Bot.", | |
"full": "Full description of Conversation Bot." | |
}, | |
"accentColor": "#FFFFFF", | |
"bots": [ | |
{ | |
"botId": "${{MICROSOFT_APP_ID}}", | |
"scopes": [ | |
"personal" | |
], | |
"supportsFiles": false, | |
"isNotificationOnly": false | |
} | |
], | |
"permissions": [ | |
"identity", | |
"messageTeamMembers" | |
], | |
"validDomains": [ | |
"token.botframework.com", | |
"${{BOT_DOMAIN}}" | |
], | |
"webApplicationInfo": { | |
"id": "${{MICROSOFT_APP_ID}}", | |
"resource": "api://botid-${{MICROSOFT_APP_ID}}" | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<ItemGroup> | |
<!-- Enable Teams Toolkit --> | |
<ProjectCapability Include="TeamsFx" /> | |
<!-- Exclude build folders --> | |
<None Remove="build/**/*" /> | |
<Content Remove="build/**/*" /> | |
<!-- Exclude local secrets file --> | |
<None Include="env\.env.local.user" /> | |
</ItemGroup> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# yaml-language-server: $schema=https://aka.ms/teams-toolkit/1.1.0/yaml.schema.json | |
version: 1.1.0 | |
environmentFolderPath: ./env | |
provision: | |
- uses: teamsApp/zipAppPackage | |
with: | |
manifestPath: ./appPackage/manifest.json | |
outputZipPath: ./appPackage/build/appPackage.${{TEAMSFX_ENV}}.zip | |
outputJsonPath: ./appPackage/build/manifest.${{TEAMSFX_ENV}}.json | |
- uses: teamsApp/update | |
with: | |
appPackagePath: ./appPackage/build/appPackage.${{TEAMSFX_ENV}}.zip | |
- uses: file/createOrUpdateJsonFile | |
with: | |
target: ./appsettings.Development.json | |
content: | |
ConnectionName: ${{CONNECTION_NAME}} | |
MicrosoftAppId: ${{MICROSOFT_APP_ID}} | |
MicrosoftAppPassword: ${{SECRET_BOT_PASSWORD}} | |
MicrosoftAppTenantId: ${{MICROSOFT_APP_TENANT_ID}} | |
MicrosoftAppType: ${{MICROSOFT_APP_TYPE}} | |
- uses: file/createOrUpdateJsonFile | |
with: | |
target: ./Properties/launchSettings.json | |
content: | |
profiles: | |
Microsoft Teams (browser): | |
commandName: "Project" | |
dotnetRunMessages: true | |
launchBrowser: true | |
launchUrl: "https://teams.microsoft.com/l/app/${{TEAMS_APP_ID}}?installAppPackage=true&webjoin=true&appTenantId=${{TEAMS_APP_TENANT_ID}}&login_hint=${{TEAMSFX_M365_USER_NAME}}" | |
applicationUrl: "http://localhost:3978" | |
environmentVariables: | |
ASPNETCORE_ENVIRONMENT: "Development" | |
hotReloadProfile: "aspnetcore" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# yaml-language-server: $schema=https://aka.ms/teams-toolkit/1.1.0/yaml.schema.json | |
version: 1.1.0 | |
environmentFolderPath: ./env |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment