I have the same problem...
The application was OK on NetduinoPlus 1, but crashes with NetDuinoPlus2.
I use Framework 4.2.2, I tried what you describe. Could you please give us 2 or 3 lines of C# sample code ?
Without AnalogInput, everything is OK, like Input and output Ports.
THANKS