As I mentioned previously in one of the articles, there are many alternatives to setup the Company Communicator development environment. The easiest way is actually using Azure directly to deploy services. It is not the most efficient in terms of debugging and time to deploy/test, but is the one recommended if you just need to make small changes to the code.
As I had to reinstall my main PC that was using a pre-release version of Windows 11, I decided to document the steps and write this article for those that are interested in experimenting with a big Teams + Azure application.
I’m also using the brand new Visual Studio 2022. So far so good and I couldn’t find any issues, but as always, use the instructions at your own risk. If you find any problems, please let me know.
I also thought about a video explaining how to setup the environment, if you believe that is useful, drop me a note in the comments and I’ll reserve some time to record.
Here are the setup steps:
- Go to https://git-scm.com/downloads and download the git tools for Windows. Install the tools with the default options. Please note that by default VI is used as the standard text editor, if you don’t know how to use VI please change to something you are familiar with.
- Go to https://nodejs.org/en/download/, download and install node.js.
- Go to https://visualstudio.microsoft.com/vs/ and install Visual Studio 2022. I installed the Professional edition, but I think you will be fine with the Community one. Please drop me a message if that edition doesn’t work and I’ll update this post accordingly. You only need the ASP.NET dev environment installed (as we are not debugging the node.js code locally with this dev setup).
- Go to https://dotnet.microsoft.com/download/visual-studio-sdks, download and install the .Net Core 3.1 SDK. That is because the current Company Communicator version is using that version of the .Net core and I don’t want to create anything that could generate incompatibilities.
- Open Windows Terminal or Command Prompt. Create a temporary folder to work on the code and execute:
git clone https://github.com/cristianoag/microsoft-teams-apps-company-communicatorto clone the repo where I host my variant. If you want to work and make changes to the original CC version, please use
git clone https://github.com/OfficeDev/microsoft-teams-apps-company-communicatorinstead.
- Optionally go to https://azure.microsoft.com/en-us/features/storage-explorer/, download and install the Azure Storage Explorer. That is because the Visual Studio 2022 doesn’t have the cloud explorer anymore, and when making changes that affect the databases, you may need to check the tables directly from the dev environment (without manually using edge to logon to the Azure portal and perform a bunch of clicks).
- Now open Visual Studio and load the Microsoft.Teams.Apps.CompanyCommunicator.sln solution that is located on the Source folder.
Note that you need to create publish profiles to the main project and each one of the Azure functions to have them deployed to the cloud. You can just right click those and select Publish. Follow the wizard providing your Azure credential and selecting the appropriate resources to deploy your solution.
Disclaimer – The information contained in this blog post doesn’t represent the official Microsoft guidance or best practices. It is just the view of the author on current alternatives, implementations and workarounds for common issues and/or business needs. Please refer to official Microsoft documentation and evaluate carefully any steps, code or procedures documented herein. The author doesn’t offer any warranty. Use this information at your own risk.