This is kevin to try to compile the firmware 4.2 for netduino plus 2.
Even if trying to get the content including how to compile for ND+2 firmware 4.2, There is no any place to be for how to.
So I ask some step to follow how to compile from scratch to begin with installing Porting Kit 4.2 and firmware 4.2.
1. To download Porting Kit 4.2
2. To download firmware 4.2 for netduino plus 2.
3. To install all.
4. To download gcc or RVDS arm compiler from where.
5. To install arm compiler
6. setenv_base.com c:rvds or c:gcc
7. msbuild /t:build /p:flavor=release;tcp_ip_stack=lwip
8. How to convert the binary to dfu for STM32F4.
7. How to flash dfu file on STM32F4 with MFDEPLOY.
As i already compiled netduino plus without error, I can understand mean you want to guide.