Skip to content

Commit 23a7ed7

Browse files
mdaiglepaulmedynski
authored andcommitted
Revert "Trim docs using pwsh via dotnet tool to support cross-platform local …" (#4127)
This reverts commit 75b33ad.
1 parent c3aaa9f commit 23a7ed7

3 files changed

Lines changed: 5 additions & 15 deletions

File tree

dotnet-tools.json

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,6 @@
1515
"apicompat"
1616
],
1717
"rollForward": false
18-
},
19-
"powershell": {
20-
"version": "7.6.0",
21-
"commands": [
22-
"pwsh"
23-
],
24-
"rollForward": false
2518
}
2619
}
2720
}

src/Microsoft.Data.SqlClient/ref/Microsoft.Data.SqlClient.csproj

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,6 @@
3636
<OutputPath>$(ArtifactPath)$(AssemblyName).ref/$(ReferenceType)-$(Configuration)/</OutputPath>
3737
</PropertyGroup>
3838

39-
<Target Name="RestoreTools">
40-
<Exec Command="dotnet tool restore" />
41-
</Target>
42-
4339
<!-- Trim Docs for IntelliSense ====================================== -->
4440
<!--
4541
It has been determined that including the remarks section in IntelliSense docs looks bad in
@@ -50,11 +46,12 @@
5046
<!-- This target runs after Build, and trims XML documentation generated in the $(OutputPath) of the project where this target is included.-->
5147
<Target Name="TrimDocsForIntelliSense"
5248
AfterTargets="Build"
53-
DependsOnTargets="RestoreTools"
5449
Condition="'$(IsCrossTargetingBuild)' != 'true' AND '$(GenerateDocumentationFile)' == 'true'">
5550
<PropertyGroup>
51+
<PowerShellCommand Condition="'$(OS)' == 'Windows_NT'">powershell.exe</PowerShellCommand>
52+
<PowerShellCommand Condition="'$(OS)' != 'Windows_NT'">pwsh</PowerShellCommand>
5653
<PowerShellCommand>
57-
dotnet tool run pwsh
54+
$(PowerShellCommand)
5855
-NonInteractive
5956
-ExecutionPolicy Unrestricted
6057
-Command "$(RepoRoot)tools\intellisense\TrimDocs.ps1 -inputFile '$(DocumentationFile)' -outputFile '$(DocumentationFile)'"

tools/targets/TrimDocsForIntelliSense.targets

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ The .NET Foundation licenses this file to you under the MIT license. -->
33
<Project>
44
<!-- This target runs after Build, and trims XML documentation generated in the $(OutputPath) of the project where this target is included.-->
55
<Target Name="TrimDocsForIntelliSense" AfterTargets="Build" Condition="'$(GenerateDocumentationFile)' == 'true'">
6-
<Exec Command="dotnet tool restore" />
7-
<Exec Command="dotnet tool run pwsh -NonInteractive -ExecutionPolicy Unrestricted -Command &quot;$(ToolsDir)intellisense\TrimDocs.ps1 -inputFile &apos;$(OutputPath)\Microsoft.Data.SqlClient.xml&apos; -outputFile &apos;$(OutputPath)\Microsoft.Data.SqlClient.xml&apos;&quot;" />
6+
<Exec Command="powershell.exe -NonInteractive -ExecutionPolicy Unrestricted -Command &quot;$(ToolsDir)intellisense\TrimDocs.ps1 -inputFile &apos;$(OutputPath)\Microsoft.Data.SqlClient.xml&apos; -outputFile &apos;$(OutputPath)\Microsoft.Data.SqlClient.xml&apos;&quot;" Condition=" '$(OS)' == 'Windows_NT' " />
7+
<Exec Command="pwsh -NonInteractive -ExecutionPolicy Unrestricted -Command &quot;$(ToolsDir)intellisense\TrimDocs.ps1 -inputFile &apos;$(OutputPath)\Microsoft.Data.SqlClient.xml&apos; -outputFile &apos;$(OutputPath)\Microsoft.Data.SqlClient.xml&apos;&quot;" Condition=" '$(OS)' != 'Windows_NT' " />
88
</Target>
99
</Project>

0 commit comments

Comments
 (0)