Skip to content

Commit 64edb33

Browse files
Share read for text resource files (#7230)
Fixes #7229 by ensuring that MSBuild's processing of a `.txt` resource holds only the minimal lock: open for read and allowing other processes to read while it's open.
1 parent 0006147 commit 64edb33

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Tasks/GenerateResource.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3876,7 +3876,7 @@ internal sealed class LineNumberStreamReader : StreamReader
38763876
private int _col;
38773877

38783878
internal LineNumberStreamReader(String fileName, Encoding encoding, bool detectEncoding)
3879-
: base(File.Open(fileName, FileMode.Open, FileAccess.Read), encoding, detectEncoding)
3879+
: base(File.Open(fileName, FileMode.Open, FileAccess.Read, FileShare.Read), encoding, detectEncoding)
38803880
{
38813881
_lineNumber = 1;
38823882
_col = 0;

0 commit comments

Comments
 (0)