Skip to content

Commit 3fcce47

Browse files
JusterZhuclaude
andcommitted
fix: template build entry point and DiffProgress namespace
- FullIntegration.cs: add 'using GeneralUpdate.Core.Models' so DiffProgress.Percentage resolves - CI: prepend top-level entry point call (Console.WriteLine + await RunAsync()) to generated Program.cs so the templates compile as a console app - Both MinimalIntegration and FullIntegration now build successfully Co-Authored-By: Claude <noreply@anthropic.com>
1 parent c24e776 commit 3fcce47

2 files changed

Lines changed: 8 additions & 0 deletions

File tree

.claude/skills/generalupdate-init/templates/FullIntegration.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
using GeneralUpdate.Core.Configuration;
33
using GeneralUpdate.Core.Download;
44
using GeneralUpdate.Core.Event;
5+
using GeneralUpdate.Core.Models;
56

67
/// <summary>
78
/// GeneralUpdate 完整集成示例 — 包含所有配置选项和事件监听

.github/workflows/ci.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,13 @@ jobs:
159159
$code = $code -replace 'MyApp\.exe', 'TestApp.exe'
160160
$code = $code -replace '1\.0\.0\.0', '1.0.0.1'
161161
$code = $code -replace 'my-product-001', 'test-001'
162+
163+
# Prepend top-level entry point call so the file compiles as a console app
164+
$nl = [Environment]::NewLine
165+
$entryPoint = "// Entry point for build verification$nl" +
166+
'Console.WriteLine("Verifying ' + $templateName + ' compiles...");' + "$nl" +
167+
"await $templateName.RunAsync();$nl$nl"
168+
$code = "$entryPoint$code"
162169
$code | Out-File -FilePath "$testDir\Program.cs" -Encoding UTF8
163170
164171
Write-Host "=== Verifying: $templateName ==="

0 commit comments

Comments
 (0)