Are the global sections of a vector bundle a projective module?  Given a scheme $X$ with structure sheaf $\mathcal{O}_X$, we can associate to each $\mathcal{O}_X$-module $\mathcal{F}$ its global sections $\Gamma(\mathcal{F})$, which gets the structure of a $\Gamma(\mathcal{O}_X)$-module. 

Suppose $\mathcal{F}$ is a vector bundle on $X$. Is then $\Gamma(\mathcal{F})$ a projective $\Gamma(\mathcal{O}_X)$-module of finite rank?

Here are two examples, where it works:


*

*If $X$ is an affine scheme, then a quasi-coherent sheaf is a vector bundle iff its global sections are a projective $\Gamma(\mathcal{O}_X)$-module [of finite rank, as Fred Rohrer pointed out]. 

*If $X$ is a projective scheme over some field $K$ and $\mathcal{F}$ an arbitrary coherent sheaf on $X$, then $\Gamma(\mathcal{F})$ is a free module of finite rank over the ring of global sections $\Gamma(\mathcal{O}_X) \cong K$. Under some restrictions, we can here also replace the field $K$ by a more general ring. 


I would guess that it works in general if the natural map $X \to Spec \Gamma(\mathcal{O}_X)$ is locally free of finite rank [edit: and surjective] or something like this. Probably this fails in general, but I have not yet a (reasonable) counter-example. I am mainly interested here in the case of a quasi-projective scheme over a (not-necessarily algebraically closed) field of characteristic zero, so I would not only be interested in counter-examples but also positive answers to my question for a reasonable subclass of schemes. 
 A: This is not always a projective module.  Here is the simplest counterexample I can think of, but there are plenty of others.  Let $Y$ be $\text{Spec} k[x,y,z]$, where $k$ is a field.  Let $X$ be the complement of the closed point $\langle x,y,z \rangle$.  Then $\Gamma(X,\mathcal{O}_X)$ equals $k[x,y,z]$ since $k[x,y,z]$ is $S_2$.
Let $M$ be the $k[x,y,z]$-module that is the kernel of the homomorphism of finite free modules $k[x,y,z]^{\oplus 3} \to k[x,y,z]$ with matrix $[x,y,z]$.  Using the Koszul complex, $M$ is also the cokernel of the transpose of this matrix.  This is not a locally free module since the rank of $M/\langle x,y,z \rangle$ is $3$, whereas the rank of $M\otimes_{k[x,y,z]} k(x,y,z)$ equals $2$.  The coherent sheaf $\widetilde{M}$ on $Y$ is not locally free.  However, its restriction to the open subset $X$ is locally free.  Moreover, $\Gamma(X,\widetilde{M}|_X)$ is just $M$ since $M$ is $S_2$.  
A: Here is another example that wont work (another variant of Jason Starr's example): consider a local ring $(R,\mathfrak{m})$ and let $U=\mathrm{Spec}\:R-\{\mathfrak{m}\}$ be its punctured spectrum. Assume that $\mathrm{depth}\:R\geq2$ and $\mathrm{Pic}(U)\neq0$. Now $U\hookrightarrow\mathrm{Spec}\:\Gamma(\mathcal{O}_U)$ is locally an isomorphism (the depth condition implies $\Gamma(\mathcal{O}_U)=R$). Now take a nontrivial line bundle $\mathcal{L}$ on $U$. To say that $\Gamma(\mathcal{L})$ is a projective $\Gamma(\mathcal{O}_U)$-module means $\Gamma(\mathcal{L})$ is a free $R$-module (over local rings projective = free). But this is not true because we assumed $\mathcal{L}$ to be a nontrivial line bundle.
A: Obviously, "locally free of finite rank" and surjective doesn't work. Compose Jason Star's morphism with the map $(x,y,z) \to ( (x+1)^2,y,z)$. It is still locally free of finite rank, but is now surjective.
