The NPDGamma collaboration reports results from the first phase of a measurement of the parity violating up-down asymmetry ${A}_{\ensuremath{\gamma}}$ with respect to the neutron spin direction of $\ensuremath{\gamma}$ rays emitted in the reaction $\mathrm{nP\vec}+p\ensuremath{\rightarrow}d+\ensuremath{\gamma}$ using the capture of polarized cold neutrons on the protons in a liquid parahydrogen target. One expects parity-odd effects in the hadronic weak interaction between nucleons to be induced by the weak interaction between quarks. ${A}_{\ensuremath{\gamma}}$ in $\mathrm{nP\vec}+p\ensuremath{\rightarrow}d+\ensuremath{\gamma}$ is dominated by a $\ensuremath{\Delta}I=1$, ${}^{3}{S}_{1}$-${}^{3}{P}_{1}$ parity-odd transition amplitude in the n-p system. The first phase of the measurement was completed at the Los Alamos Neutron Science Center spallation source (LANSCE), with the result ${A}_{\ensuremath{\gamma}}=[\ensuremath{-}1.2\ifmmode\pm\else\textpm\fi{}2.1 (\mathrm{stat}.)\ifmmode\pm\else\textpm\fi{}0.2 (\mathrm{sys}.)]\ifmmode\times\else\texttimes\fi{}{10}^{\ensuremath{-}7}$. We also report the first measurement of an upper limit for the parity-allowed left-right asymmetry in this reaction, with the result ${A}_{\ensuremath{\gamma},\mathrm{LR}}=[\ensuremath{-}1.8\ifmmode\pm\else\textpm\fi{}1.9 (\mathrm{stat}.)\ifmmode\pm\else\textpm\fi{}0.2 (\mathrm{sys}.)]\ifmmode\times\else\texttimes\fi{}{10}^{\ensuremath{-}7}$. In this paper we give a detailed report on the theoretical background, experimental setup, measurements, extraction of parity-odd and parity-allowed asymmetries, analysis of potential systematic effects, and LANSCE results. The asymmetry has an estimated size of $5\ifmmode\times\else\texttimes\fi{}{10}^{\ensuremath{-}8}$ and the aim of the NPDGamma collaboration is to measure it to $1\ifmmode\times\else\texttimes\fi{}{10}^{\ensuremath{-}8}$. The second phase of the measurement will be performed at the Spallation Neutron Source at Oak Ridge National Laboratory.