A Pennsylvania judge on Thursday rejected Bill  Cosby 's latest effort to have the sexual assault charges against him thrown out, ruling that the 78-year-old comedian must stand trial in the case.

Judge Steven O'Neill rejected arguments from  Cosby 's lawyers that prosecutors violated  Cosby 's rights by refusing to call the accuser as a witness at a preliminary hearing in May, thus shielding her from cross-examination.

"This case shall proceed to trial on those counts," O'Neill said at the conclusion of a three-hour hearing in the Montgomery County Court of Common Pleas.

Once one of the most beloved U.S. entertainers thanks to his family-friendly persona,  Cosby  is facing accusations of sexual assault from dozens of women stretching back decades. The Pennsylvania case is the only criminal prosecution against him, as most of the other allegations involve incidents that are too old to produce charges.

Cosby , who wore a pinstriped tan jacket and used a cane to walk on Thursday, has denied assaulting anyone and has portrayed the encounter with Constand as consensual.

"Today someone who has given so much to so many had his constitutional rights trampled once again," said Brian McMonagle, a lawyer for  Cosby , after O'Neill's ruling.