Skip to content

Feature/vfp UI optimization#1842

Merged
RobertvanderHulst merged 2 commits intodevfrom
feature/vfp-ui-optimization
Mar 8, 2026
Merged

Feature/vfp UI optimization#1842
RobertvanderHulst merged 2 commits intodevfrom
feature/vfp-ui-optimization

Conversation

@Irwin1985
Copy link
Contributor

  • Added Environment.UserInteractive check to immediately fallback in non-UI environments (Services, IIS, etc).
  • Refined LoadProvider to use physical file detection instead of AppDomain assembly checks to overcome .NET JIT Lazy Loading issues.
  • Ensured MESSAGEBOX() and other UI functions triggered automatically if XSharp.VFP.UI.dll is present.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR optimizes the VFP UI provider loading mechanism in VfpUIService. The key improvement is an early-exit guard that prevents UI DLL loading in non-interactive environments (Windows Services, IIS), and cleans up the DLL detection logic by switching from AppDomain assembly checks to physical file existence checks.

Changes:

  • Added Environment.UserInteractive check to immediately assign HeadlessUIProvider in non-interactive environments, avoiding unnecessary DLL discovery and loading
  • Refactored LOCAL ... AS TYPE variable declarations to VAR inference within LoadProvider() for brevity

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@RobertvanderHulst RobertvanderHulst merged commit 47cac89 into dev Mar 8, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants