Building the dev environment for Company Communicator with Visual Studio 2022

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.

Setup Steps

Here are the setup steps:

  1. 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.
  2. Go to https://nodejs.org/en/download/, download and install node.js.
  3. 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).
  4. 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.
  5. 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-communicator to 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-communicator instead.
  6. 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).
  7. 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.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Website Powered by WordPress.com.

Up ↑

%d bloggers like this: