@@ -15,6 +15,16 @@ $PSNativeCommandUseErrorActionPreference = $true
1515# Workaround for bug at https://github.com/PowerShell/PowerShell/issues/23875#issuecomment-2672336383
1616$PSDefaultParameterValues [' Remove-Item:ProgressAction' ] = ' SilentlyContinue'
1717
18+ function EnsureDocfxBinaries () {
19+ # Temporary workaround until a proper DocFX build supporting .NET 10 is available.
20+ $zipFile = [IO.Path ]::Combine($env: TEMP , ' docfx-net10-binaries.zip' )
21+
22+ if (! (Test-Path - Path ' docfx-net10-binaries' )) {
23+ Invoke-WebRequest - Uri ' https://github.com/json-api-dotnet/docfx/raw/refs/heads/dotnet10-rtm/net10-binaries.zip' - Method ' GET' - OutFile $zipFile
24+ Expand-Archive $zipFile - Force
25+ }
26+ }
27+
1828function EnsureHttpServerIsInstalled {
1929 if ((Get-Command " npm" - ErrorAction SilentlyContinue) -eq $null ) {
2030 throw " Unable to find npm in your PATH. please install Node.js first."
@@ -45,6 +55,7 @@ function EnsureHttpServerIsInstalled {
4555 }
4656}
4757
58+ EnsureDocfxBinaries
4859EnsureHttpServerIsInstalled
4960
5061if (-Not $NoBuild -Or -Not (Test-Path - Path _site)) {
@@ -58,7 +69,7 @@ if (-Not $NoBuild -Or -Not (Test-Path -Path _site)) {
5869dotnet tool restore
5970
6071$env: DOCFX_SOURCE_BRANCH_NAME = " dev"
61- dotnet docfx docfx.json -- warningsAsErrors true
72+ dotnet exec docfx- net10 - binaries / docfx.dll -- docfx.json -- warningsAsErrors true
6273
6374Copy-Item - Force home/* .html _site/
6475Copy-Item - Force home/* .ico _site/
0 commit comments