Skip to content

Commit 0a1a004

Browse files
committed
ensure that the directory must be created before writing the file
1 parent 0fa6260 commit 0a1a004

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/Smdn.MSBuild.DefineConstants.NETSdkApi/APIList.targets

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ SPDX-License-Identifier: MIT
7979
</ParameterGroup>
8080
<Task>
8181
<Code Type="Fragment" Language="cs"><![CDATA[
82+
System.IO.Directory.CreateDirectory(System.IO.Path.GetDirectoryName(Path));
8283
System.IO.File.WriteAllText(Path, Content, System.Text.Encoding.Default /* no bom */);
8384
]]></Code>
8485
</Task>

0 commit comments

Comments
 (0)