-
Notifications
You must be signed in to change notification settings - Fork 196
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reference to #12548 | How to Create and configure "React, TypeScript based Teams App" using Teams Toolkit in Visual Studio #12549
Comments
@npagare currently Teams Toolkit in Visual Studio has not yet include Teams app template or samples using React/TS as frontend for tab app and together with .NET project. We can treat this as a new requirement and plan it for future improvement. For now, maybe you can try to create an Empty Teams app first, which Teams Toolkit will generate a Teams configuration project without any source code. Then in the generated Teams Solution, right click on the solution to add a new React .Net project as the Tab app source project. Then configure your manifest to fill in the launch Url as the Tab url. So that you can use Teams Toolkit to preview your Teams tab app. |
Hi @summzhan, thank you. It will be great if the Teams Toolkit for Visual Studio starts supporting React/TS as frontend tab app. I will follow your recommended steps and update you as soon as possible. Thank you |
Hello @summzhan, I followed recommended steps; and here are few observations. I created an empty React TS project. Created a self-signed certificate (key and crt) which is stored in a {project path}\certs folder. The vite.config.ts takes a parameter - mode which accepts value http or https. If not passed the default value of the port 5173 is used. In TeamsApp project - the manifest.json file includes following entries (in addition to other ones) Observations -
I would appreciate your help. Thank you, |
For 1. I could add the app in Teams as a standalone app but the app was not working. The https link is not loading the app successfully. What am I missing to get this working automatically for the configured https url?_
For 2. I could publish the app to the dev portal and from there to the MS365 organization. |
For _3. When I tried to add the App as a tab in a specific channel of a Team, I don't see the save button as enabled. |
@npagare For _3, could you open the developer tools by F12 and check the error message in console? I wonder this error is caused by teams sdk initialization. |
I'm visiting the app website URL as https://localhost:55173 |
Hello @hund030, how are you? I opened dev tools by F12 and shown below are messages in browser console and VS Teams Toolkit output - ### Are you open for a screen-share session via a Teams call? |
@npagare Sure. Could you tell me your email address? Iet me send you a meeting. |
Hello @hund030, Thank you. |
@npagare
Here is a complete sample of react teams app with vite. It works in VS Code, though. |
Hello @hund030, after updating teamsapp.local.yml using my own variables I still get the error when debugging app in the Team / Channel. How does the Teams App resolve the value for the variables SSL_CRT_FILE and SSL_KEY_FILE at runtime? Those are the environment variables defined in the react App. In my case those variables are defined in the .env.https file which is stored inside the "env" folder. When I run my app as a standalone and pass the mode (a parameter to the defineConfig function) as https, it works fine except in the browser it shows https as strike out because it is a self-signed certficate. |
@npagare The errors in console usually come from teams, which is not relative to your app. We usually ignore them. |
Describe the bug
Refer to the GitHub issue #12548
Refer the Additional context. Please help me with request # 4
"I want to create Teams App using React, TypeScript, Tailwind but in Visual Studio. How do I create it?"
Adding React Asp.Net type of project adds client and server project.
But when tried to debug the client fails to run unless the server has started manually first.
This is per VS wizard for adding that project type.
To Reproduce
Steps to reproduce the behavior:
Refer to the GitHub issue #12548, then, Refer the Additional context > request # 4
Expected behavior
Guidance on how to use Teams Toolkit in Visual Studio for adding React Typescript based Teams Tab project.
Even the skeleton App should work. I should be able to preview it in Teams without any error (as outlined in #12548)
and must be able to debug the react / TS code.
Screenshots
N/A
Visual Studio Team Toolkit Extension Information (please complete the following information):
CLI Information (please complete the following information):
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: