VS2015 is out and free to use and (excepting for the moment, Gadgeteer) supports NETMF and one of the neater features to come along in a while is “Shared Projects”. I use these all the time for sharing code between platforms (especially useful with Xamarin).
When you reference a shared source project from another ‘normal’ project (class library or program) then all of the files in the shared project get compiled into your class-library or program. That is, they get included as source code as if they were part of the project you are compiling. This is a much easier approach than the previous practice of using symbolic links to include source files in more than one project, because when you add a file to a shared source program, it is automatically linked into all the projects that reference that shared source project.
The problem is, currently you can’t use “Add Reference” to add a shared source project into a NETMF project. However, you can still make this work for NETMF.
To reference a shared source project, right click on the project and select “Unload project” and then “Edit project”. Go to the end of the .csproj file and in front of the first <Import…/> line, add this:
Now, of course, the path has to point to your shared-source project file, so make sure the path is correct (it should be a relative path, relative to the location of your .csproj file) and the file name should be the name of your shared source project file with .shproj changed to ".projitems".
When you complete the edit, hit Ctrl-S and the right click on the project again and select "Reload project"
You should now see something like the screen capture below (note that Verdant.Vines.XBee.Shared is included in the NETMF and UWP projects. So now you can write source code for both UWP and NETMF or for multiple different NETMF platforms at the same time and at the source-code level (remembering the restrictions on NETMF syntax of course - you must code to the least common denominator). If you need platform-specific code (you will) then place that in either the UWP or NETMF project and it will only get compiled there.