The particle-number projection method is formulated for density-dependent f
orces and in particular for the finite-range Gogny force. Detailed formula
for the projected energy and its gradient are provided. The problems arisin
g from the neglection of any exchange term, which may lead to divergences,
are thoroughly discussed and the possible inaccuracies estimated. Numerical
results for the projection after variation method are shown for the nucleu
s Er-164 and for the projection before variation approach for the nuclei Cr
-48,Cr-50. We also confirm the Coulomb antipairing effect found in mean-fie
ld theories. (C) 2001 Elsevier Science B.V. All rights reserved.