In the extreme case of a gas, viscosity comes mostly from the diffusion of molecules between layers of the flow (this diffusion transports momentum between the layers) — this is why a hard sphere gas is viscous for example. In the opposite extreme of the friction between two solids, this clearly does not happen: in that case, friction comes mostly from short distance repulsion between molecules or atoms.
The problem to go further is that there is a continuum of material between solids and gases, not to mention that a thin layer of the surface of a solid can melt under friction.