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:
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:
Select the first one, Connect to Dataverse. This will display the login 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:
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:
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:
This will open the local XPP configurations window:
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!