Check for valid gadget projects early on

Doing this because we run into annoying problems
trying to implement implicit compiling for legacy
gadgets without breaking unrelated tests.
Compile legacy gadgets on preview