a few basics: not pushing too big a gear on climbs? do you spin or grind? must spin to save the knees until you get more strength around the joints.
seat post height too low, you should have a good leg extension without your hips rocking to compensate.
seat to far back or forward, causes tight angle on knees when peddling.
maybe trying to knock over climbs too fast causing fatigue and lesser muscle groups (and knees) doing more than their fair share.
finally rest, are you riding with fatigue? this is why we cross train to avoid repetitive injury and to share the training load.
I support the above.
You need to reduce the load on your knees. This can be done by
Loosing any extra weight you are carrying
Spin. Learn to do this on a road bike (Easier to control) I used to be a very strong grinder then my knees started failing. Retrained myself and can now average over 100rpm on road rides.
Lots of light but fast strengthening rides means my knees can now handle the odd abusive rides.
Now I am doing regular 60+km hard MTB rides with no issues and fast as well. Jumping and aggressive riding.
Listen to your body. If it hurts then change it. I find knee braces make things worse.
Biopace can help but there are two way it can be setup. One is smoothing pedaling and the other is smoothing power. The former is what you want. Basically the large diameters is perpendicular to the crank.