Development in cloud-hosted development environments without admin access
As of Microsoft Dynamics 365 for Finance and Operations, Enterprise edition, Platform update 12, customers will no longer have access to virtual machine (VM) administrator accounts on development or build environments that are running in Microsoft subscriptions. This restriction only applies to new deployments of Platform update 12 (or newer) environments. Environments that were deployed before this update, and have been updated to Platform update 12, will still have administrator access.
You can use a remote desktop (RDP) to access these restricted environments using the non-admin user provided on the Lifecycle Services (LCS) environment page. For more information about environments that don't allow administrator access, see Development and build VMs that don't allow administrator access FAQ.
If you deploy an environment using Microsoft Azure subscription in Lifecycle Services (LCS), then you will not have admin access in this environment. If you need admin access in your environment, use your Azure subscription and deploy the environment using LCS. You can also use the downloadable VHD and deploy it in your Azure virtual machine (VM) or host it locally to get full admin access.
If you don’t have admin access in the environment, you will not be able to test and debug using Modern POS. You can still do all retail customization for POS if you are testing the customization, you must use Cloud POS in that environment. From a customization perspective, there is no difference between Cloud POS and Modern POS - any customization will work both in Cloud POS and Modern POS. There is no additional logic or code for customization completed in Cloud POS in order to work in Modern POS or vice versa, unless you added logic that is browser-specific or UWP app- specific for Hardware and other scenarios. Another option is to do all development work in the environment using Modern POS and test it in some other environment where you have admin access to install MPOS. In most cases, you should be able to test using Cloud POS, expect if you want to test for offline scenarios. If you want to test offline scenarios, you can create a Modern POS installer using the build script, and then test it in your test environment or some other POS registers.
If you are using Cloud POS for development, set up the following configuration before opening the Cloud POS project
Open Visual Studio and click View > Application Explorer. Wait for Internet Information Services (IIS) Express to start with all the Retail websites deployed. You should see the IIS tray icon in the task bar with all the Retail websites running, such as Cloud POS and Retail Server.
To debug CRT/RS extensions, attach the CRT/RS project to the IIS Express process.
When you open the Cloud POS project from the Retail SDK, IIS Express may fail with the following error.
Filename: redirection.config Error: Cannot read configuration file
To resolve this issue
- Close Visual Studio.
- Copy the aspnet.config and redirection.config files to %userprofile%\Documents\IISExpress\config.
- Open the applicationhost.config file in the %userprofile%\Documents\IISExpress\config folder.
- In applicationhost.config, change the physcialPath of RetailCloudPos to point to your SDK location. For example, physicalPath="K:\RetailSDK\POS\Web". The overall section will look like the following:
<site name="RetailCloudPOs" id="4" serverAutoStart="true"> <application path="/" applicationPool="Dynamics365"> <virtualDirectory path="/" physicalPath="K:\RetailSDK\POS\Web" /> </application>
- Save the changes to applicationhost.config
- Rename the %userprofile%\Documents\IISExpress\config folder. Do not delete the files because you will copy the applicationhost.config file to a new location in step 8.
- Start Visual Studio again with the Cloud POS project. The %userprofile%\Documents\IISExpress\config folder will be recreated with the default config files.
- Copy the applicationhost.config file from the folder that you renamed in step 6, to the folder created in step 7.
- Right-click the Pos.Web project and click Properties.
- In the Properties window, click the Web tab. Select the Start URL radio option and set the start URL as your Cloud POS URL. For example,
- Save the changes.
Install the Developer topology prerequisites
Cloud-hosted development environments do not include Typescript version 2.2.2 by default, and the default Windows host file does not contain the Cloud POS URL to use for local debugging. The Developer topology prerequisites package installs Typescript 2.2.2 and updates the Windows host file with your Cloud POS URL. Deploying the package will take a few minutes.
To install the Developer topology prerequisites:
- Go to Lifecycle Services (https://lcs.dynamics.com) and sign in.
- Under Projects, select the project where your dev environment is deployed.
- In the More tools section, click the Asset library tile.
- Select Software deployable package for the Asset library type and click Import.
- In the Shared asset library list, select Developer topology prerequisites and click Pick.
- Go to the Environments section, and click your development environment.
- Click the Maintain tab and select Apply updates.
- Select Developer topology prerequisites and click Apply.