Required .NET Micro Framework (NETMF) Deployment Files

I recently put a project up for bid on ELance to get support added for resolving .NET Micro Framework (NETMF) libraries to be dynamically discovered by NuGet when building packages. This support already seems to exist for regular .NET Framework projects but NETMF projects have a unique build and output structure.

The winner of the bid needed to know which of the files output from a NETMF project should be put in the NuGet package. After a couple hours of absently searching I was unable to find a definitive, authoritative answer. The files I identified through trial-and-error are shown in the following images.

By default, a NETMF project will build to a bin directory. Taking a look at the Release folder for MicroLinq we see this output structure:

DirectoryStructure

In the root of the Release folder we see the DLL and PDB we’re familiar with from other project types. The BE and LE subdirectories are specific to NETMF builds and are important. Remember that NETMF projects target embedded hardware projects. The microprocessors used could be either Big Endian or Little Endian. These BE and LE folders contain slightly different builds of the code to reflect this difference.

So what about the files under the BE and LE folders? We have the same DLL and PDB from the parent directory, why are they also included here? I actually have no idea. Through trial and error I found it’s not important that these files be included in the package. In fact, the duplicate DLL files can cause confusion in Visual Studio in some cases. It’s best to just omit these.

The real meat is in the PE and PDBX files. These are required for a project to build and deploy to NETMF targets. Looking at file size my guess is the PE contains the byte code that is interpreted by the NETMF TinyCLR at run time. The PDBX seems to contain the symbols and metadata. I would guess only the PE is pushed on the hardware while the PDBX is used by the development environment but I’m not 100% sure.

After playing around, this is the eventual structure I’ve found to be necessary.

RequiredPackage

The highlighted entries are the required files. The entries that are crossed out should be explicitly omitted from the package to avoid Visual Studio confusing the references. The PDB entries that aren’t marked can be included or left out.

Hope this acts as a useful reference. I’d love to know the details behind the files to be sure but this will have to do for now.

Experimentally,
-Erik

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s