Creating a New Cloud Hosted Environment (D365FO)

Creating a New Cloud Hosted Environment (D365FO)


This article will answer the following questions:

  1. How to create a new cloud hosted environment from LCS?
  2. How to deploy new cloud hosted environment from LCS?
  3. How to move source code from old cloud hosted VM to new cloud hosted VM?
  4. How to make VS 2017 project compatible with VS 2022?

There are many articles available on the internet which have explained the whole process pretty well.

Here are some of those article(s)/video(s):

https://www.youtube.com/watch?v=ZWyKoat-vdA?(Best one.)

https://www.ljdynamicswritings.com/2023/12/how-to-create-new-d365fo-cloud-hosted.html?

https://medium.com/@ahmadabdulquadir56/deploying-a-d365fo-cloud-hosted-environment-690913e22b35

While I was performing this activity, I also took some screenshots, so I will paste them here just to recall everything.

Login to LCS:

https://lcs.dynamics.com/v2

Go to the the project.

Click on the Hamburger icon and click on Cloud Hosted Environments.

Here you will find your existing cloud hosted environments. Click on Add icon.

Select the latest application version and platform from dropdown.

Select DEVTEST topology.

Select Develop Project

Select any azure connector available in the next secreen.

Enter the Enviroment Name, Select appropriate size, select accept checkbox.


Click on Advanced settings button.


No change required in this tab.

Select None from the AX Database dropdown as we don't want Contoso data to be imported.

No change required in this tab.

You may Enable this option to speed up the performance of VM but later on I have to again Disable this option as enabling requires more configurations.

No change required in this tab.

Enter the new VM name:

No change required in this tab.

No change required in this tab.

No change required in this tab. Click done.

Click Next button

Click Deploy.

It showed me error as I enabled Premium Storage Settings.

I Disabled Premium Storage Settings.

Again clicked on Deploy

It will show in the cloud hosted environments page. The Deployment status would be Queued.

The Deployment status will change to Deploying.

The Deployment status will change to Deployed. This would be the final status. It almost takes 6-7 hours to get this done.

Click on the new VM and click on Full details link.

From the details page you can get the username and password and download the RDP.



I will mention extra details and address the issues about which nobody has spoken yet.

After you have created a new cloud hosted environment, following are the pending tasks: ?

  1. Move all the source code from the old VM to new VM.
  2. Restore the PRD database.?
  3. Move the solution files from old VM to new VM.

Restoring the PRD database is relatively an easy task. I have written a separate article on this. You can find that article on this link

There are multiple ways of moving the source code:

1. Model Export/Import.

https://learn.microsoft.com/en-us/dynamics365/fin-ops-core/dev-itpro/dev-tools/models-export-import

2. .axpp file export/import.

https://learn.microsoft.com/en-us/dynamics365/fin-ops-core/dev-itpro/dev-tools/projects#export-a-projects-as-an-axpp-file

3. Azure DevOps. (Connect to the Azure DevOps repo from Team Explorer and pull the data.)


You may face the following issue when tyring to a solution file created in old VM in VS 2017.


The project will not correctly. ?As the VS 2017 project file is not compatible with VS 2022.

?To resolve this issue, close the Visual Studio instance and do the following steps:

?

  1. Open your project's rnrproj file in notepad. Scroll all the way to the bottom of the file. ?

?

2. Remove the following line:

? <Import Project="$(BuildTasksDirectory)\Microsoft.Dynamics.Framework.Tools.BuildTasks.targets" />

?

3. And add the following line instead:

<Import Project="$(BuildTasksDirectory)\Microsoft.Dynamics.Framework.Tools.BuildTasks.17.0.targets" />

Now open the solution file in VS2022 and it will perfectly open. ?


You will find some models on which the export command does not work. So you can simply zip the Model folder, copy it and paste it into new VM. And then Go to Visual Studio > Extensions > Models Management > Refresh Models.

I hope this article will help someone in doing this activity.

Thank you for reading this article.



要查看或添加评论,请登录

Muhammad Abbas的更多文章

社区洞察

其他会员也浏览了