Oxygen vacancies have a significant impact on the structure and electrical/magnetic properties of doped manganites. Magnetic La0.5Sr0.5MnO3 (LSMO) films were epitaxial grown on (001) SrTiO3 substrate by pulsed laser deposition. Structural studies from the x-ray diffraction suggest that the as-grown films are fully constrained by the substrate with the thickness ranging from 8 to 40 nm. By examining the valence of Mn by x-ray photoelectron spectroscopy and x-ray absorption spectroscopy, we find the ratio of Mn4+/Mn3+ increases along with the increased film thickness, which implies that the oxygen vacancies concentration induced by tensile strain correspondingly decreases. Therefore, the magnetization of LSMO is depressed with the exchange bias effect arising, and the electrical conductivity decreases significantly. This work builds a bridge between modulation of electric/magnetic properties and epitaxial strain in LSMO films.