Copy file from linux to windows share with C# (.NET core)
How about by using CIFS from Samba to mount the share. Once you've installed cifs-utils, you could try something like:
mkdir ~/localMountPoint
mount -t cifs //server/share ~/localMountPoint -o user=myname,pass=mypassword
There's a more in depth tutorial here: https://www.howtogeek.com/176471/how-to-share-files-between-windows-and-linux/