Docker build "Can't add file used by another process"

My recent attempt to put an older .NET Framework app inside a container also hit another snag. Embarassingly for me, if I'd read the actual error it would've been a quick fix. Unfortunately I got caught up with a previous docker vs anti-virus issue and went down a rabbit hole I hope others can avoid.

In my case it was Visual Studio locking a ".dbml" file of a database project. If you get a error with "can't add file...The process cannot access the file because it us being used by another process", save yourself sometime and read the first part of the error.

Install dotnet global tool with private NuGet feed

If you have a private NuGet feed and are getting a 401 Unauthorised while trying to install a .NET Global Tool, you're not alone.

Thankfully there's an easier way to solve it than removing your feed each time.