Unmanaged File Deployment

Visual Studio 2003 features an undocumented method for deploying unmanaged files along with a .NET class library. This is intelligent enough to support different platforms and processor types and is used by Visual Studio's "Build CAB" feature. The system is based around XSL documents which should be placed into:- The file contains one or more packages each with a unique name which corresponds to an assembly dll. Normally you would only define a single Package in an XSL file – this represents your single control or component. You can then define multiple platform configurations which define the native files to be deployed. Currently there are two platforms supported:- There is the capability for further platforms to be added in the future if required. For each of these platforms there are a number of possible CPU types. Therefore a valid entry might be:- Which will define the files required for a Pocket PC device with an ARM/XScale. This defines the location on the device where files will be deployed to. Depending on the complexity of your project you may have a single native dll or a selection of files. There are essentially two approaches here – you could deploy single files (as this example will show) or deploy a CAB file with a number of components. If you are deploying a CAB file you would normally have the remote path set as the device root – “\”. CompactFrameworkSDK\v1.0.5000\Windows CE\wce300\ARM This setting defines the source of the files. It is good practice to follow other controls (including built in components) by installing your unmanaged components to the appropriate sub-folder within the CompactFrameworkSDK folder on the developers machine. However you could set this to any valid path on the machine – just change the UseRelativePath attribute to false. ARM ARM here is the identifier of the CPU architecture, obviously this must be one of the currently supported architectures the .NET Compact Framework is available for – valid CPU types are:- The Name attribute of the CAB node must match that of the accompanying FILE entry.

posted on 2004-07-23 11:33  LeighSword  阅读(158)  评论(0编辑  收藏  举报

导航