we used to use different code when --framework was specified than when it was not specified, this synchronizes them to use the same code path which removes a hidden NullRef also adds tests to cover both cases
this will make net451 deployment work for x86 apps