Connect to an Azure DevOps project in Visual Studio
Before you begin developing, you must link Visual Studio to your organization's Azure DevOps project.
Configure Visual Studio to connect to your team project
To configure Visual Studio to connect to your team project, follow these steps:
- Open Visual Studio. If you're signed in to the machine as an administrator, you must open Visual Studio as an administrator.
- Select Tools > Options > Source Control > Plug-in Selection.
- In the Current source control plug-in field, select Visual Studio Team Foundation Server.
- Select OK.
- Open your Team Explorer by selecting View > Team Explorer.
- Select Manage Connections > Connect to a Project. A dialog opens to connect to your project.
- To connect by server, select Add Azure DevOps Server and then enter the server URL.
- Select Add > Connect.
Map your Azure DevOps project to your local model store and projects folder
Your model store root folder contains source files of all packages and models that are part of your application. During deployment, you can use source files from more than one model across more than one package. We recommend that you map your model store root folder to the Azure DevOps team project metadata folder.
- In Visual Studio Team Explorer, connect to the team project.
- Open Source Control Explorer from Team Explorer.
- Map the Metadata folder of your team project to the root folder of the model store on your local drive (typically K:\AOSService\PackagesLocalDirectory).
- Select Map, and on the next dialog, select No.
- Map the /Trunk/Main/Projects server folder to the local projects folder that holds your Visual Studio solution and project files.
Work with source control in Visual Studio
After you link your project, you can add new Visual Studio projects to source control. This step allows for version control, which ensures that code is checked out while developers make changes. When you check in changes, the system creates a new version, which allows you to track changes, identify contributors, and revert to previous versions if necessary.
To stay updated with the latest code, use the Get Latest command to merge the most recent changes into your local environment. If conflicts arise, the Resolve Conflicts page in Visual Studio offers three panes to help:
- Left pane - Displays your current code.
- Right pane - Shows the new code.
- Bottom pane - Previews the automatically merged code.
You can choose to accept the automatic merge or manually decide which changes to keep.