@Gooly , based on my test, you could try to install nuget-package
Microsoft.TeamFoundationServer.Client to use the code in Github.
Also, I noticed that there is a compile error in the code after I add the package.
You could make changes in the following code. (just add two null parameters otherwise it will cause conflict between classes)
var attachmentObject = _witClient.CreateAttachmentAsync(uploadStream, "Canvas.png", "Simple",null,null).Result;
Update for the steps that how to use the nuget-package without internet.
First, Please download the nuget-package from the link Microsoft.TeamFoundationServer.Client in the another computer.
Second, after the downloading, you will get a NUPKG file and copy it to the no-internet computer.
Third, you could create a folder and copy the NUPKG file to the folder, like the following:
Fourth, Please open your project and open the nuget-package.
Fifth, Please click theGears
Sixth, Please click '+' , set the source of the nuget and click update and ok.
Finally, you could choose Package source and install the nuget-package.
Hope this could help you.
If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.