Skip to content

Commit aa84cd6

Browse files
committed
Use a response file for GenAPI commands
- work around dotnet/arcade#4021
1 parent 0019148 commit aa84cd6

File tree

1 file changed

+13
-7
lines changed

1 file changed

+13
-7
lines changed

eng/targets/ReferenceAssembly.targets

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -61,15 +61,21 @@
6161
</ItemGroup>
6262

6363
<PropertyGroup>
64+
<_GenApiFile>$([MSBuild]::NormalizePath('$(ArtifactsDir)', 'log', 'GenAPI.rsp'))</_GenApiFile>
6465
<_GenAPICommand Condition="'$(MSBuildRuntimeType)' == 'core'">"$(DotNetTool)" --roll-forward-on-no-candidate-fx 2 "$(_GenAPIPath)"</_GenAPICommand>
65-
<_GenAPICmd>$(_GenAPICommand)</_GenAPICmd>
66-
<_GenAPICmd>$(_GenAPICmd) "$(TargetPath)"</_GenAPICmd>
67-
<_GenAPICmd>$(_GenAPICmd) --lib-path "@(_ReferencePathDirectories)"</_GenAPICmd>
68-
<_GenAPICmd>$(_GenAPICmd) --out "$(_RefSourceFileOutputPath)"</_GenAPICmd>
69-
<_GenAPICmd>$(_GenAPICmd) --header-file "$(RepoRoot)/eng/LicenseHeader.txt"</_GenAPICmd>
70-
<_GenAPICmd>$(_GenAPICmd) --exclude-api-list "$(RepoRoot)/eng/GenAPI.exclusions.txt"</_GenAPICmd>
66+
<_GenAPICmd>$(_GenAPICommand) @"$(_GenApiFile)"</_GenAPICmd>
67+
<_GenApiArguments><![CDATA[
68+
"$(TargetPath)"
69+
--lib-path "@(_ReferencePathDirectories, '%3B')"
70+
--out "$(_RefSourceFileOutputPath)"
71+
--header-file "$(RepoRoot)/eng/LicenseHeader.txt"
72+
--exclude-api-list "$(RepoRoot)/eng/GenAPI.exclusions.txt"
73+
]]>
74+
</_GenApiArguments>
7175
</PropertyGroup>
7276

77+
<WriteLinesToFile File="$(_GenApiFile)" Lines="$(_GenApiArguments)" Overwrite="true" />
78+
7379
<MakeDir Directories="$(_RefSourceOutputPath)" />
7480
<Message Importance="High" Text="Generating $(_RefSourceFileOutputPath)" />
7581
<Exec Command="$(_GenAPICmd)" />
@@ -96,4 +102,4 @@
96102
</ItemGroup>
97103
</Target>
98104

99-
</Project>
105+
</Project>

0 commit comments

Comments
 (0)