Dotnet gitignore pr consolidation

I went through all the CSharp and VisualStudio related PRs I could find and consolidated the changes in this PR since they all can't be merged any more given the recent changes. I cherry picked the commits that worked so everyone gets credit for their contribution.