Setup Dataverse Git Integration For A Solution

Setup Dataverse Git Integration For A Solution

A Power Platform solution can be connected to a Git repo for tracking and management of changes to code. This is known as source control. To do this, a Git repo must be setup inside an Azure DevOps project. Then you can choose whether to connect individual solutions or the entire environment to source control

Table Of Contents:
• Initialize A Git Repo In Azure DevOpsConnect The Environment To A Git RepoSelect A Solution To Connect To GitConnect Another Solution To GitCommit Code Changes To A Git RepositoryView The Unpacked Solution In Source Control




Initialize A Git Repo In Azure DevOps

Go to Azure DevOps and open a project where you want the repo to be located. Then go to the Repos page and Initialize a new main branch with a readme.



The main branch of the repo will appear with a readme file inside of it.




Connect The Environment To A Git Repo

We want to connect the development environment to our git repo. Go to the development environment and open the Solutions page. Select Connect to Git from the top-menu bar.




Fill-in the Connect to Git menu with the following values the press the Next button.

  • Connection Type – Solution
  • Organization – the Azure DevOps organization where your repo is located
  • Project – the Azure DevOps project where your repo is located
  • Repository – the name of the repository
  • Root Git Folder – “src” (which means source)




Select A Solution To Connect To Git

On the next screen we must select a solution to connect to git and select a branch and folder. Use the following values and press the Connect button.

  • Solution – YourSolutionName
  • Branch – main
  • Git folder – src/YourSolutionName



After a few moments the solution will become connected to Git.



And the solution folder will appear in the repo. The folder will only include a readme file until we commit changes made to the solution.




Connect Another Solution To Git

Our Dataverse Git integration was setup with the connection type Solution. This means we must connect individual solutions one-by-one. To connect another solution, open the solution and go to the source control page. Then press the Connect to Git button and go through the wizard steps once again.




Next Steps

Continue to the next steps in the Power Platform Pipelines & ALM Setup Guide.

Next: Commit Code Changes To A Git Repo >>





Questions?

If you have any questions about Setup Git Integration For A Power Platform Solution please leave a message in the comments section below. You can post using your email address and are not required to create an account to join the discussion.

Subscribe
Notify of
guest

6 Comments
Oldest
Newest
Inline Feedbacks
View all comments
Joao Silva
Joao Silva
2 months ago

Hello, this is great, but I think we should be able to have possibility to change the project on devops also. Example
SharePoint DEV (Power Platform environment for all solutions that connect to sharepoint)
with Solution “Project A” and Solution “Project B”

If we have
Project A (Azure Devops Project)
Project B (Azure Devops Project)

We cannot connect to the different projects.

Did you have any workaround for this?

Rick Curtis
2 months ago

Matthew, always great info. Could you talk about the difference between Connection Types – Environment vs Solution and why you would pick on over the other.

Ed Bellman
Ed Bellman
1 month ago

Matthew, have you run into any Solution binding issues using the per Solution connection type?

The system requires that there only be one location in source control for each and every solution object, which means that if you’re going to choose to bind solutions to different source locations, the system doesn’t allow you to have the same component in multiple solutions.

From this line it sounds like you can’t have two solutions with shared components in the same source control location – although it isn’t clear what the “location” is, is it a folder or a repo or a project? But if that is the case then I wonder how MSFT is handling it when you connect an entire Environment. Thanks!

Carlos Guanes
Carlos Guanes
2 months ago

Thank you very interesting post and tried to follow this, but I cannot figure out what permission I’m missing as I cannot see the GIT Icon on the left side once I open the solution that I want link to DevOps
What is the permission that I need to see the Git Icon and add my Solution?

Peter Lindqvist
Peter Lindqvist
25 days ago

I thought this would be neat to use, but I quickly found out that this does not support multi tenant organizations, even though I have azure devops access and permissions on the same account as in power platform. When the azure devops org lives in another tenant from the power platform solution it seems I’m out of luck.