and goncha@uevora.pt Dedicated to Panos M. Pardalos in honor of his 60th birthday Summary. We study well-posedness of some mathematical programming problem depending on a parameter that generalizes in a certain sense the metric projection onto a closed nonconvex set. We are interested in regularity of the set of minimizers as well as of the value function, which can be seen, on one hand, as the viscosity solution to a Hamilton-Jacobi equation, while, on the other, as the minimal time in some related optimal time control problem. The regularity includes both the Fréchet differentiability of the value function and the Hölder continuity of its (Fréchet) gradient.