Superconducting coplanar-waveguide resonators that can operate in strong magnetic fields are important tools for a variety of high-frequency superconducting devices. Magnetic fields degrade resonator performance by creating Abrikosov vortices that cause resistive losses and frequency fluctuations or suppress the superconductivity entirely. To mitigate these effects, we investigate lithographically defined artificial defects in resonators fabricated from Nb-Ti-N superconducting films. We show that by controlling the vortex dynamics, the quality factor of resonators in perpendicular magnetic fields can be greatly enhanced. Coupled with the restriction of the device geometry to enhance the superconductors critical field, we demonstrate stable resonances that retain quality factors ≃105 at the single-photon power level in perpendicular magnetic fields up to BâŠ¥ ≃20mT and parallel magnetic fields up to Bâ¥ ≃6T. We demonstrate the effectiveness of this technique for hybrid systems by integrating an In-Sb nanowire into a field-resilient superconducting resonator and use it to perform fast charge readout of a gate-defined double quantum dot at B=1T.