In this paper, we consider the nonlinear constrained optimization problem (NCP) with a constraint set \({ \mathcal {K} }:=\{x \in { \mathcal {X} }: c(x) = 0\}\) , where \({ \mathcal {X} }\) is a closed convex subset of \(\mathbb {R}^n\) . We propose an exact penalty approach, named constraint dissolving approach, that transforms (NCP) into its corresponding constraint dissolving problem (CDP). The transformed problem (CDP) admits \({ \mathcal {X} }\) as its feasible region with a locally Lipschitz smooth objective function. We prove that (NCP) and (CDP) share the same first-order stationary points, second-order stationary points, second-order sufficient condition (SOSC) points, and strong SOSC points, in a neighborhood of the feasible region \({ \mathcal {K} }\) . Moreover, we prove that these equivalences extend globally under a particular error bound condition. Therefore, our proposed constraint dissolving approach enables direct implementations of optimization approaches over \({ \mathcal {X} }\) and inherits their convergence properties for solving problems of the form (NCP). Preliminary numerical experiments illustrate the high efficiency of directly applying existing solvers for optimization over \({ \mathcal {X} }\) to solve (NCP) through (CDP). These numerical results further demonstrate the practical potential of our proposed constraint dissolving approach.