Use FileShare.None when creating files
(cherry picked from commit 480dd66428e2a8bf76c0747256f2e99b15aae212)
Signed-off-by: Joshua M. Boniface <joshua@boniface.me>
Analyzers are only run in debug build, so setting TreatWarningsAsErrors
for release build will catch the compiler warnings until we resolve all
analyzer warnings.