The Pontryagin Maximum Principle is applied to the switched system optimization problem resulting in a generalization of a well known necessary condition for switching time optimality. The switched system optimization may be formulated as an infinite dimensional problem where the switching control design variables, at any given time, are constrained to the integers. This paper analyzes projection-based techniques for handling the integer constraint. The necessary condition derived in this paper uses the cost composed with the projection of the design variables onto the feasible set. A specific form of projection is considered and two candidate projections are proposed one projects the immediate value of the switching control and neglects the state while the second is variable on the projected state error.