Let $A$ be a commutative noetherian ring.
Suppose $M$ is a finitely generated $A$-module.
Let $n>0$ be an integer. It is well known that if $Ext^n(M,N) = 0$ for all $A$-modules $N$, then $M$ has a finite projective dimension.
What happens if we only know this for finitely generated $N$?
That is, suppose that for all fintiely generated $N$ we have that $Ext^n(M,N)=0$. Does it still follow that $M$ has a finite projective dimension?
Because $M$ is finitely generated, the $Hom(M,-)$ functor and taking cohomology are both operations which commute with infinite direct sum, the result is true for any free $A$-module. Is this enough to show that $Ext^n(M,N)$ vanishes for any $N$?
Edit: maybe going a little further is enough? as far as I understand, since $M$ is finitely generated, it follows (does it?) that $Hom(M,\varinjlim N_i) \cong \varinjlim Hom(M,N_i)$, and since direct limits commute with taking cohomology, expressing $N$ has the direct limit of finitely generated modules, the result follows. Is this correct?
Second Edit: so it turns out by the comments that if $M$ is not projective, the argument above is false. In my case, $M$ is actually not projective. So, anyone has another idea/counter example?