Hi Greg,
I think I have found an easy solution but
you need to install the latest visual micro arduino plugin which is disguised on our codeplex site as the Teensy Alpha Version. The version is not alpha any longer I just have not had time to change its name.
Summary - Arduino IDE Custom Hardware Support (Boards) All Arduino versions support custom "hardware" in a similar manner to how custom "libraries" are supported.
Custom hardware can be defined in a folder called "hardware" that exists at the same location as the "libraries" folder. The following zip contains a "hardware" folder with 3 custom board definitions.
Arduino mega 1280 HAL (apm1)
Arduino mega 2560 HAL (apm1)
Arduino mega 2560 HAL (apm2)
Extract this zip to the same folder that contains the "Libraries, Arducopter, Apmrover etc" folders.
Re-start visual studio after unzipping the file and you should see the three new boards at the end of the arduino boards list. Select the board you require and the compile should be identical to the modified apm arduino ide.
Notes A bug in visual micro means that currently you must leave the project defines (discussed earlier) in visual studio. When the next version of vm is released you will no longer need the defines in Visual Studio because the custom hardware definition automatically includes the correct defines.
The custom hardware "options and defines" syntax is compatible with the Teensy Ide which means that the TeensyDuino Ide will also now compile Apm which might be useful for linux and mac users.
Creating a fork of the arduino ide is no easy task. I notice the apm version does not remember which sketch was last open and suffers a few other minor glitches. The Teensyduino ide is more mature and also caters for "custom" user interface menus should the need arise. (An example of a custom menu is the "Ardupilot" menu in the modified ide).
The diyd community might consider teensyduino in place of the modified arduino ide. You could remove arduino boards that are not used (such as uno) and make a more meaningful boards list for new users.
Visual Micro does not care which ide you have installed. In fact, even the standard arduino 1.0.3 or 1.0.4 ide will work with apm and the custom hal boards.
When using the custom HAL boards that appear in the boards list in the modified arduino ide users will still need to set the HAL options as per the standard apm guidelines.
It is not possible to build a project based on the custom hal boards in the standard arduino ide.
The Teensyduino ide format is a better solution for diydrones than the apm ide because Teensyduino allows the UI and the build process to be altered via the custom hardware definitions. This avoids the need a "hard coded" ide which must be frequently updated.
Diyd seem to recommend placing the "arduino ide" under the apm firmware folder. I guess they feel it is easier for new users to install the software this way. This is not required and in my view it makes things more complicated for users. I would install whichever ide we want to use in a folder such as "c:\arduino\apmIDE". When upgrading the ide I would rename the old one to "c:\arduino\apmIDE_last" and install the new ide in "c:\arduino\apmIDE". So the "current" ide is always in the same place regardless of apm firmware version.
The teensyduino ide supports other variations but I have chosen the 3 HAL board route because it represents less wiki space. We only have to explain to users about switching board between 1280/2560/hal where the modified ide requires us to explain about boards and then about the "Ardupilot" Hal menu options. 3 different variations of HAL board also works well with the compiler cache, no need to re-start ide