Let $G$ be a connected Lie group with Lie algebra $\mathfrak{g}$ acting faithfully on a smooth, finite-dimensional manifold $M$. Let $C^\infty(M)$ and $\mathcal{X}(M)$ denote the ring of smooth functions and the smooth vector fields on $M$, respectively.
The group action defines a Lie algebra homomorphism $\mathfrak{g} \to \mathcal{X}(M)$ sending $X \in \mathfrak{g}$ to the vector field $\zeta_X$. This turns $C^\infty(M)$ into a $\mathfrak{g}$-module, with action $f \mapsto \zeta_X f$.
I am interested in the first cohomology $H^1(\mathfrak{g};C^\infty(M))$. These are equivalence classes of cocycles; that is, linear maps $h: \mathfrak{g} \to C^\infty(M)$ satisfying $$ \zeta_X h(Y) - \zeta_Y h(X) = h([X,Y]) $$ for all $X,Y \in \mathfrak{g}$, where two cocycles $h_1$ and $h_2$ are equivalent if there exists some $f \in C^\infty(M)$ such that $$ h_1(X) - h_2(X) = \zeta_X f $$ for all $X \in \mathfrak{g}$. These are the standard definitions, but I record them here for completeness and in case people have seen these conditions in a non-cohomological context.
My main question is whether there are any results on $H^1(\mathfrak{g};C^\infty(M))$. For example, is it still the case that if $\mathfrak{g}$ is semisimple, the cohomology is $0$? (This would be the case for finite-dimensional modules.)
Although I am working in a fairly general context and do not have any $\mathfrak{g}$ or $M$ in mind, I would be interested in any results, even if for particular $\mathfrak{g}$ and $M$, that may illustrate techniques to compute the cohomology.
An interesting geometric avatar of this cohomology group (and the source of my question) is when $M$ is a co-oriented contact manifold and $G$ acts preserving the contact structure. The cohomology group in question houses the obstruction to the existence of an invariant contact one-form.