Fix XML escaping
- #12786 - escape `'<'` chars in attribute values to make the .targets file valid XML - escape `'\''` chars nested within single-quoted values to make `msbuild` conditions valid
This commit is contained in:
parent
7324387bf6
commit
8dd1be9474
|
|
@ -2,7 +2,7 @@
|
|||
<Project>
|
||||
<PropertyGroup Condition=" '$(OpenApiGenerateDocuments)' == '' ">
|
||||
<OpenApiGenerateDocuments
|
||||
Condition=" '$(TargetFrameworkIdentifier)' == '.NETCoreApp' AND '$(TargetFrameworkVersion.TrimStart('vV'))' < '2.1' ">false</OpenApiGenerateDocuments>
|
||||
Condition=" '$(TargetFrameworkIdentifier)' == '.NETCoreApp' AND '$(TargetFrameworkVersion.TrimStart("vV"))' < '2.1' ">false</OpenApiGenerateDocuments>
|
||||
<OpenApiGenerateDocuments Condition=" '$(OpenApiGenerateDocuments)' == '' ">true</OpenApiGenerateDocuments>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
|
|
@ -16,7 +16,7 @@
|
|||
</ItemGroup>
|
||||
|
||||
<Target Name="OpenApiGetDocuments" Returns="@(_OpenApiProjectDocuments)">
|
||||
<Error Text="OpenAPI document generation is disabled. Add '<OpenApiGenerateDocuments>true</OpenApiGenerateDocuments>' to the project."
|
||||
<Error Text="OpenAPI document generation is disabled. Add '<OpenApiGenerateDocuments>true</OpenApiGenerateDocuments>' to the project."
|
||||
Condition=" '$(OpenApiGenerateDocuments)' != 'true' " />
|
||||
|
||||
<ReadLinesFromFile File="$(_OpenApiDocumentsCache)">
|
||||
|
|
@ -32,7 +32,7 @@
|
|||
Inputs="$(TargetPath)"
|
||||
Outputs="$(_OpenApiDocumentsCache)">
|
||||
<Error Text="OpenAPI document generation is not supported when targeting netcoreapp2.0 or earlier. Disable the feature or move to a later target framework."
|
||||
Condition=" '$(TargetFrameworkIdentifier)' == '.NETCoreApp' AND '$(TargetFrameworkVersion.TrimStart('vV'))' < '2.1' " />
|
||||
Condition=" '$(TargetFrameworkIdentifier)' == '.NETCoreApp' AND '$(TargetFrameworkVersion.TrimStart("vV"))' < '2.1' " />
|
||||
|
||||
<PropertyGroup>
|
||||
<_Command>dotnet "$(MSBuildThisFileDirectory)/../tools/dotnet-getdocument.dll" --assembly "$(TargetPath)"</_Command>
|
||||
|
|
|
|||
Loading…
Reference in New Issue