See the question and my original answer on StackOverflow

You can use this library: SMBLibrary which supports SMB2. I'll quote the description here:

SMBLibrary is an open-source C# SMB 1.0/CIFS, SMB 2.0 and SMB 2.1 server implementation.

SMBLibrary gives .NET developers an easy way to share a directory / file system / virtual file system, with any operating system that supports the SMB protocol.

SMBLibrary is modular, you can take advantage of Integrated Windows Authentication and the Windows storage subsystem on a Windows host or use independent implementations that allow for cross-platform compatibility.

SMBLibrary shares can be accessed from any Windows version since Windows NT 4.0.

It's mostly for coding a server, but it also has a client part here: