Skip to content

Commit daf411c

Browse files
authored
Use more specific MSBuild property name for dotnet-getdocument (#55958)
1 parent a9bb484 commit daf411c

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

src/Tools/Extensions.ApiDescription.Server/src/build/Microsoft.Extensions.ApiDescription.Server.targets

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -51,19 +51,19 @@
5151
Text="OpenAPI document generation is not supported when targeting netcoreapp2.0 or earlier. Disable the feature or move to a later target framework." />
5252

5353
<PropertyGroup>
54-
<_Command>dotnet "$(MSBuildThisFileDirectory)../tools/dotnet-getdocument.dll" --assembly "$(TargetPath)"</_Command>
55-
<_Command>$(_Command) --file-list "$(_OpenApiDocumentsCache)" --framework "$(TargetFrameworkMoniker)"</_Command>
56-
<_Command>$(_Command) --output "$(OpenApiDocumentsDirectory.TrimEnd('\'))" --project "$(MSBuildProjectName)"</_Command>
57-
<_Command Condition=" '$(ProjectAssetsFile)' != '' ">$(_Command) --assets-file "$(ProjectAssetsFile)"</_Command>
58-
<_Command Condition=" '$(PlatformTarget)' != '' ">$(_Command) --platform "$(PlatformTarget)"</_Command>
59-
<_Command Condition=" '$(PlatformTarget)' == '' AND '$(Platform)' != '' ">$(_Command) --platform "$(Platform)"</_Command>
60-
<_Command Condition=" '$(RuntimeIdentifier)' != '' ">$(_Command) --runtime "$(RuntimeIdentifier) --self-contained"</_Command>
61-
<_Command>$(_Command) $(OpenApiGenerateDocumentsOptions)</_Command>
54+
<_DotNetGetDocumentCommand>dotnet "$(MSBuildThisFileDirectory)../tools/dotnet-getdocument.dll" --assembly "$(TargetPath)"</_DotNetGetDocumentCommand>
55+
<_DotNetGetDocumentCommand>$(_DotNetGetDocumentCommand) --file-list "$(_OpenApiDocumentsCache)" --framework "$(TargetFrameworkMoniker)"</_DotNetGetDocumentCommand>
56+
<_DotNetGetDocumentCommand>$(_DotNetGetDocumentCommand) --output "$(OpenApiDocumentsDirectory.TrimEnd('\'))" --project "$(MSBuildProjectName)"</_DotNetGetDocumentCommand>
57+
<_DotNetGetDocumentCommand Condition=" '$(ProjectAssetsFile)' != '' ">$(_DotNetGetDocumentCommand) --assets-file "$(ProjectAssetsFile)"</_DotNetGetDocumentCommand>
58+
<_DotNetGetDocumentCommand Condition=" '$(PlatformTarget)' != '' ">$(_DotNetGetDocumentCommand) --platform "$(PlatformTarget)"</_DotNetGetDocumentCommand>
59+
<_DotNetGetDocumentCommand Condition=" '$(PlatformTarget)' == '' AND '$(Platform)' != '' ">$(_DotNetGetDocumentCommand) --platform "$(Platform)"</_DotNetGetDocumentCommand>
60+
<_DotNetGetDocumentCommand Condition=" '$(RuntimeIdentifier)' != '' ">$(_DotNetGetDocumentCommand) --runtime "$(RuntimeIdentifier) --self-contained"</_DotNetGetDocumentCommand>
61+
<_DotNetGetDocumentCommand>$(_DotNetGetDocumentCommand) $(OpenApiGenerateDocumentsOptions)</_DotNetGetDocumentCommand>
6262
</PropertyGroup>
6363

6464
<Message Importance="high" Text="%0AGenerateOpenApiDocuments:" />
65-
<Message Importance="high" Text=" $(_Command)" />
66-
<Exec Command="$(_Command)" LogStandardErrorAsError="true" />
65+
<Message Importance="high" Text=" $(_DotNetGetDocumentCommand)" />
66+
<Exec Command="$(_DotNetGetDocumentCommand)" LogStandardErrorAsError="true" />
6767
</Target>
6868

6969
<!-- Unless this is an inner build or default timing is disabled, tie document retrieval into the build. -->

0 commit comments

Comments
 (0)