Skip to content

Commit c2ad22f

Browse files
committed
The release workflow copies each RockWeb\Bin .refresh file's DLL into Bin before building, as Visual Studio does, because a command-line website build cannot resolve the netstandard2.0 ones and App_Code then fails on Ical.Net
1 parent 831f904 commit c2ad22f

1 file changed

Lines changed: 17 additions & 0 deletions

File tree

‎.github/workflows/release.yml‎

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,23 @@ jobs:
144144
working-directory: ${{ env.ROCK_PATH }}
145145
run: nuget restore RockWeb/packages.config -SolutionDirectory . -NonInteractive
146146

147+
# Each RockWeb\Bin\*.refresh names a restored DLL for Bin. Visual Studio copies them, but a
148+
# command-line website build cannot resolve the netstandard2.0 ones (MSB3268), so Ical.Net and
149+
# others never reach Bin and App_Code fails to compile. Copy them first, as Visual Studio does.
150+
# A .refresh for a package RockWeb no longer lists is skipped.
151+
- name: Copy RockWeb's referenced DLLs into Bin
152+
working-directory: ${{ env.ROCK_PATH }}
153+
run: |
154+
$copied = 0
155+
Get-ChildItem RockWeb\Bin -Filter *.refresh | ForEach-Object {
156+
$dll = Join-Path $_.DirectoryName $_.BaseName
157+
$source = Join-Path (Resolve-Path RockWeb) (Get-Content $_.FullName -Raw).Trim()
158+
if (Test-Path $dll) { return }
159+
if (Test-Path $source) { Copy-Item $source $dll; $copied++ }
160+
else { Write-Output "Skipped $($_.Name): $source is not restored." }
161+
}
162+
Write-Output "Copied $copied DLLs into RockWeb\Bin."
163+
147164
# dotnet build cannot build RockWeb (MSB4249), so use Visual Studio's MSBuild. The verify tool
148165
# needs RockWeb\bin.
149166
- name: Build Rock

0 commit comments

Comments
 (0)