  We briefly review the formal picture in which a Calabi-Yau $n$-fold is the
complex analogue of an oriented real $n$-manifold, and a Fano with a fixed
smooth anticanonical divisor is the analogue of a manifold with boundary,
motivating a holomorphic Casson invariant counting bundles on a Calabi-Yau
3-fold. We develop the deformation theory necessary to obtain the virtual
moduli cycles of \cite{LT}, \cite{BF} in moduli spaces of stable sheaves whose
higher obstruction groups vanish. This gives, for instance, virtual moduli
cycles in Hilbert schemes of curves in $\Pee^3$, and Donaldson-- and
Gromov-Witten-- like invariants of Fano 3-folds. It also allows us to define
the holomorphic Casson invariant of a Calabi-Yau 3-fold $X$, prove it is
deformation invariant, and compute it explicitly in some examples. Then we
calculate moduli spaces of sheaves on a general $K3$ fibration $X$, enabling us
to compute the invariant for some ranks and Chern classes, and equate it to
Gromov-Witten invariants of the ``Mukai-dual'' 3-fold for others. As an example
the invariant is shown to distinguish Gross' diffeomorphic 3-folds. Finally the
Mukai-dual 3-fold is shown to be Calabi-Yau and its cohomology is related to
that of $X$.
