@claude 解决它
Activity
claude commentedon Nov 12, 2025
Claude finished @gaoconggit's task —— View job •
claude/issue-78-20251112-1544• Create PR ➔Fixed macOS Avalonia Compatibility Issues ✅
I've successfully fixed the issues preventing the Avalonia desktop application from running on macOS.
Changes Made
1. Program.cs - STAThread Attribute
Made the
[STAThread]attribute Windows-only using conditional compilation:The STAThread attribute is Windows-specific and causes issues on macOS/Linux.
2. SharpPad.Desktop.csproj - Windows-Only Features
BuiltInComInteropSupportconditional (Windows-only)ApplicationManifestconditional (Windows-only)Both COM interop and app manifests are Windows features that don't apply to macOS.
3. MainWindow.axaml - Icon Path
Removed the hardcoded Windows icon path from the XAML. The icon is already properly configured in the .csproj with platform-specific conditions.
Build Status
✅ Build now succeeds with 0 warnings and 0 errors
The desktop application should now run properly on macOS while maintaining full compatibility with Windows and Linux.
Next Steps
You can now:
dotnet run --project SharpPad.Desktop/SharpPad.Desktop.csproj./package-macos.sh| Branch
Fix macOS compatibility issues in Avalonia desktop application