Share via


Customizing MFDeploy

MFDeploy provides an API that enables you to develop your own program that takes advantage of its functionality. The MFDeploy tool offers this ability so that you can create deployment programs that are specific to the needs of your production environment. In particular, you can write your own deployment programs to automate many deployment tasks. The reference section of this document presents a complete description of the MFDeploy API.

When writing a deployment application with the MFDeploy API, you begin with the MFDeploy and MFDevice classes. The MFDeploy class enables your program to discover and connect to .NET Micro Framework devices. The MFDevice class lets your program connect directly to TinyBooter, which resides on the .NET Micro Framework device. It also gives access to much of the MFDeploy tool's primary functionality. Specifically, it provides methods for deploying and erasing applications, forcing a reboot, executing code on the device, and pinging a device to ensure that it's still operational. Use the MFApplicationDeployment and MFApplicationDeploymentData classes to hold the .NET Micro Framework application data to be deployed.

MFDeploy supports connections to devices over serial, TCP/IP, and USB ports. Therefore, its API provides classes to access that functionality. In particular, applications use the MFSerialPort, MFTcpIpPort, MFUsbPort, and MFUsbConfiguration classes to create objects that access and control communications ports.

The MFDeploy tool provides you with the capability to manually adjust a device's network connection settings. You can accomplish the same thing programmatically with the methods of the MFNetworkConfiguration class.

Your program can sign the code it deploys to devices. Use the KeyPair class and the PublicKeyUpdateInfo structure to store signature key information. Use the methods of the MFKeyConfig class to create key pairs and update the key information on the device.