Let $M$ be a smooth connected oriented without boundary non-compact manifold of dimension n.

Let $k$ be a principal ideal, e. g. the integers $Z$

Let $H_n(M)$ and $H^n(M)$ be the homology and cohomology in degree n of $M$ with coefficients in $k$.

It is well-known that $H_n(M)=0$.

Is $H^n(M)$ also trivial ?

By the universal coefficient theorem for cohomology, $H^n(M)=Ext(H_{n-1}(M),k)$. Therefore if $k$ is a field, $H^n(M)=0$. I would like to know this answer over a principal ideal: $Z$.

It is also known (Bredon's book) that $H_{n-1}(M)$ is without torsion. But I believe that $H_{n-1}(M)$ in the non-compact case, is a not a finitely generated $k$-module. Therefore I don't know if $H_{n-1}(M)$ is free, i. e. projective. Since there exists abelians groups without torsion, non-free, e. g. the rationals $Q$

I suppose that this must be well-known. But I could not find a reference.