I have some code and when it executes, it throws a IOException, saying that
IOException
The process cannot access the file \'filename\' because it
Using FileShare fixed my issue of opening file even if it is opened by another process.
using (var stream = File.Open(path, FileMode.Open, FileAccess.Write, FileShare.ReadWrite)) { }