Chapter 1: X++ Unit Test Framework
Chapter 2: Working with Data
Chapter 3: Classes
Chapter 4: Forms
Chapter 5: Visual Studio Integration
Chapter 6: Workflow
Lesson 3 : Managed code projects
Managed code projects:
Visual Studio Tools lets developers automatically deploy the output of their managed code projects. For example, if you have a class library project, deployment involves copying the assembly to the correct locations.
To enable the deployment features, you must first add your project to the model store in Microsoft Dynamics AX. For more information, see Adding a Visual Studio Project to the AOT and How to: Add a Visual Studio Project to the AOT.
This topic describes how the deployment of managed code for Microsoft Dynamics AX works. For more information about how to deploy code, see How to: Configure Deployment of Managed Code Assemblies.
The general sequence of events for deploying managed code is as follows:
- Build the project and add it to the model store.
- Set the deployment properties for the project.
- Right-click the project and then click Deploy. When the managed code is actually deployed depends on the deployment options that you select.
Project Properties for Deployment
After you add a project to the Application Object Tree (AOT), project properties are enabled that let you define where the project should be deployed.
- Deploy to Server
- Deploy to Client
- Deploy to EP
The managed code deployment properties are available at the project level. To view these properties in Visual Studio, select the project in Solution and Explorer and then click View > Properties Window.
Deploy to Server
When you add a managed code project to the model store, the project files (including the source code) as well as the output, are stored in the model store. If the Deploy to Server property is set to Yes, the system deploys the project output (a DLL, for example) by copying it to the server Bin directory.
Deploy to Client
When you add a managed code project to the model store, the project files as well as the output, are stored in the model store. If the Deploy to Client property is set to Yes, the system deploys the project output (a DLL, for example) by copying it to the client Bin directory.
Deploy to Enterprise Portal
If the Deploy to EP property is set to Yes, the system deploys the compiled project output to the Bin folder for the Enterprise Portal server. Typically, the Bin folder is located here: If the Deploy to EP property is set to Proxies, only the .cs files for the project are deployed to the Proxies folder within the App_Code folder for the Enterprise Portal server.