ariste.info
  • MSDyn365 & Azure DevOps ALM
  • Get my book!
  • ISV License Generator
  • About me
    • About me
    • Subscribe
    • Contact
  • Logo
  • LinkedIn

Unified experience ALM

  • Welcome to the new ALM guide
    • Introduction
    • Prerequisites
  • Create and prepare Azure DevOps organization and project
    • Create an Azure DevOps organization
    • Create an Azure DevOps project
    • Enable TFVC projects in Azure DevOps
    • Add CI/CD agents with an Azure subscription
  • Unified development environment
    • What are unified developer environments?
    • Transition to a capacity-based model
    • Deploying a unified developer environment using PowerShell
    • Deploy an UDE environment from PPAC
    • Upgrade version in a Unified Development Environment
    • Useful links
  • Using Visual Studio
    • Connect Visual Studio to your UDE
    • Deploy code to a Unified Development Environment
  • Pipelines
    • What’s new in the pipelines?

Legacy Guide

  • Welcome
    • Welcome!
  • Dynamics 365 for Finance & Operations & Azure DevOps
    • Intro
    • Package and model planning
    • Azure DevOps
    • First steps
    • The build server
    • Visual Studio
    • Some advice
    • Branching strategies
  • Azure Pipelines
    • Builds
    • Continuous integration
    • Gated check-ins
    • Set up the new Azure DevOps tasks for Packaging and Model Versioning
  • Azure hosted build for Dynamics 365 Finance & SCM
    • Intro
    • Azure agents
    • How does it work?
    • What do I need?
    • Azure DevOps artifacts
    • Prepare Azure DevOps
    • Configure pipeline
    • Update for version 10.0.18 and greater
  • Azure DevTest Labs powered builds
    • Intro
    • Azure DevTest Labs
    • Getting and preparing the VHD
    • Create a DevTest Labs account
    • Creating the VM
    • Preparing the VM
    • Create a new image
    • Azure DevOps pipelines
    • Run the build
    • Times
    • Show me the money
    • Some final remarks
  • Add and build .NET projects
    • Intro
    • Build .NET in your pipeline
    • Add a C# project to FnO
    • Build pipelinebui
    • Things I don’t like/understand/need to investigate
  • Release Pipelines
    • Intro
    • Setting up Release Pipeline in Azure DevOps for Dynamics 365 for Finance and Operations
    • AAD app creation
    • Create the release pipeline in DevOps
    • Creating the LCS connection
    • New Azure DevOps release tasks: MSAL authentication and ADAL deprecation
  • Automation
    • Update VMs using pipelines and d365fo.tools
    • Builds
    • Releases
    • But I like to add some human touch to it
    • Extra bonus
    • Update a variable in a release
  • LCS DB API
    • Call the LCS Database Movement API from your Azure DevOps Pipelines
    • Automating Prod to Dev DB copies
    • Restore a data package with Azure DevOps Pipelines
  • Secure your Azure Pipelines with Azure Key Vault
    • Azure Key Vault
    • Securing your Azure DevOps Pipelines
View Categories
  • ariste.info
  • Dynamics 365 F&O Dev ALM guide
  • Unified experience ALM
  • Using Visual Studio
  • Connect Visual Studio to your UDE

Connect Visual Studio to your UDE

Now that we have a running UDE environment with F&O running on Dataverse it’s time to start working!

Prerequisites #

To follow this section, you need:

  • A Dataverse environment with the F&O development tools installed.
  • Visual Studio 2022 with the Modelling SDK installed.
  • LocalDB installed
  • Admin rights on your local PC

The Modelling SDK and LocalDB can be installed from the Visual Studio installer, you don’t need to download them from anywhere.

Install the PPAC extension #

We need to install the Power Platform Tools for VS 2022 extension. Go to the Extensions menu, Manage extensions and look for Power Platform:

Install Power Platform Tools for VS 2022 extension
Install Power Platform Tools for VS 2022 extension

Click install and close Visual Studio to complete the extension installation.

Connect to the UDE #

When it’s done, open Visual Studio again, you should see some new items under the Tools menu:

Power Platform tools new menu options
Power Platform tools new menu options

Select the first one, Connect to Dataverse. This will display the login dialog:

Login to PPAC dialog
Login to PPAC dialog

Unselect the Sign as current user option and select the Display list of available organizations. If the user you’re using in Visual Studio is the same you’re using as an admin on PPAC you could leave the first option selected, but in my experience it’s usually a source of problems.

Click the Login button and an authentication window should open, enter your PPAC admin credentials and you will get a list of your PPAC environments:

PPAC environments
PPAC environments

Select the one that you deployed with the developer tools and click the Login button. Another dialog will open, asking you to select a solution, choose the one that’s not the Default one and click the Done button.

The environment selector will display all Dataverse environments, but it will only allow to connect to the ones that have the developer tools installed.

Once it’s connected it will ask you if you want to download metadata, the F&O extension for VS and other assets, click Yes.

The process is now mostly automated, and you can follow the progress in the Output window.

It will download the Metadata folder (PackagesLocalDirectory) in a ZIP file, a copy of the cross-references database and the Visual Studio F&O extension.

Then it will proceed to unzip the metadata, install the VS extension, and restore the X-ref database. There are usually no issues, but sometimes your local instance of LocalDB is not running and the DB restore fails.

You can start it with this command:

SqlLocalDB.exe start

During the process, Visual Studio can close and reopen automatically. If it closes and doesn’t open again, do it manually.

After opening VS, go to the extension menu, Visual Studio will freeze for a second and then you will see this message:

F&O extension and UDE setup done!
F&O extension and UDE setup done!

Checking the Metadata configuration #

If you open the Extensions menu again, now you should see the Dynamics 365 menu. Open it and select the Configure metadata option:

Configure metadata
Configure metadata

This will open the local XPP configurations window:

Local XPP config
Local XPP config

Here you can see your active configuration details. The name of the environment, version, which X-ref DB it’s using, and where your metadata and custom metadata are.

What do you mean custom metadata…? Oh well, this is one of the BEST things that the unified developer experience brings, in my opinion.

With UDE, we get the PackagesLocalDirectory installed in one location, usually in your user’s AppData folder. This is used only for the standard models and packages.

And your models and packages are in a separate folder that you can map wherever you want to. This also makes using Git A LOT easier.

Your custom metadata is then mapped to the PackagesLocalDirectory folder using symlinks automagically.

And what’s even better? Well, you could have several configurations, with several custom metadata folders in different locations, and you can change between them by just setting the current one in the config screen!

Now you’re ready to start coding!

Subscribe! #

Receive an email when a new post is published
What are your Feelings
Share This Article :
  • Facebook
  • X
  • LinkedIn
  • Pinterest
Still stuck? How can I help?

How can I help?

Deploy code to a Unified Development Environment

2 Comments

  1. Daniel 1 month ago Reply

    Gran post Adrià!

    Love the “automagically” part of this.

    If I understand well, it Is possible to have also several PackagesLocalDirectory folders with different versions (10.0.41, 10.0.42, …) and with several custom metadata, isn’t it?

    Have you tested the performance-side of UDE? What hardware stack do you recommend?

    Saludos!

    • Adrià Ariste Santacreu Post Author 1 month ago Reply

      Muchas gracias Daniel!

      Yes, that’s correct. If you connect to different UDE environments with different versions, it will ask you to download the assets, and it’ll configure a new metadata setup for each. And then you can switch between them.

      Regarding hardware, I guess that as long as you have an SSD it’ll be fine.

Write A Comment Cancel Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Table of Contents
  • Prerequisites
  • Install the PPAC extension
  • Connect to the UDE
  • Checking the Metadata configuration
  • Dynamics 365 Community
  • Subscribe!
  • Microsoft MVP
  • LinkedIn
  • Privacy Policy
  • Contact
  • About me

© 2024 ariste.info. Designed by CazaPelusas.

Top

    Type above and press Enter to search. Press Esc to cancel.