I hope this question is not a duplicity, but I really failed to find a good reference for it.
I am wondering whether there is a generalization of the Gauss-Bonnet theorem to real vector bundles on a manifold with a boundary. The special case of tangent bundles is well studied -- it is well known that integration of the Euler class of the tangent bundle reduces to the good old Gauss-Bonnet theorem on the underlying manifold. But is it possible to generalize Gauss-Bonnet to an arbitrary real vector bundle on a manifold with a boundary, i.e. not necessarily the tangent one?
I would be grateful for a suitable reference. As a start, I would be completely satisfied with the case of a 2-dimensional bundle on a 2-dimensional manifold with a boundary (i.e. no need to complicate this most elementary story with the higher-dimensional Gauss-Bonnet-Chern generalization).